Forgot the code.., Need help :( |
Forgot the code.., Need help :( |
ml69 |
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> <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> <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 |
pandy |
Feb 23 2010, 07:48 AM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,731 Joined: 9-August 06 Member No.: 6 |
|
ml69 |
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. |
pandy |
Feb 24 2010, 10:22 AM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,731 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.
|
ml69 |
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/ |
pandy |
Feb 24 2010, 03:28 PM
Post
#6
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,731 Joined: 9-August 06 Member No.: 6 |
The content changes so I guess it works.
|
Frederiek |
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. |
pandy |
Feb 25 2010, 11:51 AM
Post
#8
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,731 Joined: 9-August 06 Member No.: 6 |
Oops. I didn't look too close.
|
Lo-Fi Version | Time is now: 26th April 2024 - 08:54 AM |