The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Forgot the code.., Need help :(
ml69
post Feb 22 2010, 09:05 PM
Post #1





Group: Members
Posts: 8
Joined: 22-February 10
Member No.: 11,174



Hi. I'm trying to the HTML code for the page jumps. Like, Links still displaying on the same page. But the content changing. Example http://romeldris.ca When you click on "About" it stays on the same page. I'm trying to find the code and what is it. Someone please help me.


Not sure if its this:
QUOTE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script type="text/javascript" src="../../../javascript/search.js"></script>
</head>
<body>
<div id="page_wrapper">
<h1>Heading</h1>
<div id="results-page1">
<div id="1" style="display:none;">
<div id="page-count">Results 1 - 10 of 19<br><br>Page:<br>
<a href="#page_wrapper" onclick="switchid('1')">1</a>&nbsp;
<a href="#page_wrapper" onclick="switchid('2')">2</a>
</div>
TESTT!!!!!!!!!!!!!!!!!!!!11
</div>
</div>
<div id="results-page2">
<div id="2" style="display:none;">
<div id="page-count">Results 11 - 19 of 19<br><br>Page:<br>
<a href="#page_wrapper" onclick="switchid('1')">1</a>&nbsp;
<a href="#page_wrapper" onclick="switchid('2')">2</a>
</div>
TESTT!!!!!!!!!!
</div>
</div>
</div>
</body>
</html>


If it is can someone help me code it properly?

This post has been edited by ml69: Feb 22 2010, 09:08 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 23 2010, 07:48 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



See http://htmlhelp.com/faq/html/links.html#named-anchor .

What does switchid() do?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
ml69
post Feb 24 2010, 05:42 AM
Post #3





Group: Members
Posts: 8
Joined: 22-February 10
Member No.: 11,174



I'm looking for something like this http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/

But without tabs and stuff.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 24 2010, 10:22 AM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



What? Display content from external files? Couldn't you use that script then and modify it not to use tabs? I don't think anchors come into it, BTW.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
ml69
post Feb 24 2010, 03:16 PM
Post #5





Group: Members
Posts: 8
Joined: 22-February 10
Member No.: 11,174



Thing is i dont know how do to id :S
I'm not sure if i got it on my test page
http://604-media.ca/indextest/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 24 2010, 03:28 PM
Post #6


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



The content changes so I guess it works.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Feb 25 2010, 02:50 AM
Post #7


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



Of course it works, as the links go to separate pages, as links normally already do. The content doesn't stay on the same page.

The DynamicDrive sample you pointed to uses an XMLHttpRequest (see http://en.wikipedia.org/wiki/AJAX), calling external files into a div dynamically.

Pandy is right, you can style those tabs differently and use that script anyway. Just follow the instructions on how to set up and use the script. Then alter the accompanying CSS.

Another way would be to have all content already coded within the page and then use a script to show/hide the content on demand. See for an explanation of that and sample page ALA's article Let them eat cake.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 25 2010, 11:51 AM
Post #8


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Oops. I didn't look too close.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 20th April 2024 - 12:38 AM