Michdd Posted August 7, 2009 Share Posted August 7, 2009 You see it on many websites where content will switch. I know how to do this easily, accept if I want to load a page with a certain starting content it's pretty complicated and I have to use $_GET variables and such. But on many websites I see it's done through like pagename.php#section, is there a standard way for creating dynamic content? If so can you point me in the direction of an example? Quote Link to comment Share on other sites More sharing options...
watsmyname Posted August 7, 2009 Share Posted August 7, 2009 You see it on many websites where content will switch. I know how to do this easily, accept if I want to load a page with a certain starting content it's pretty complicated and I have to use $_GET variables and such. But on many websites I see it's done through like pagename.php#section, is there a standard way for creating dynamic content? If so can you point me in the direction of an example? I didnt understand what you meant, can you give the example site?? and pagename.php#section is the internal linking. Quote Link to comment Share on other sites More sharing options...
haku Posted August 7, 2009 Share Posted August 7, 2009 I don't know if you mean jquery, but with jquery you can do this: $("#target_div").load("source_page.php #source_div#); Which means load the contents of the div that an id of 'source_div' from the page called 'source_page.php' into the div with an id of 'target_div' on the page that this script is on. Quote Link to comment Share on other sites More sharing options...
Michdd Posted August 7, 2009 Author Share Posted August 7, 2009 I don't know if you mean jquery, but with jquery you can do this: $("#target_div").load("source_page.php #source_div#); Which means load the contents of the div that an id of 'source_div' from the page called 'source_page.php' into the div with an id of 'target_div' on the page that this script is on. This might be what I'm looking for, but I'm not completely sure. Here's an example: http://www.apple.com/ipodtouch/gallery/ You'll notice the links to change gallery display are like #image2, #image3, etc.. But if you also directly visit http://www.apple.com/ipodtouch/gallery/#image2 it loads that page with the second item. Quote Link to comment Share on other sites More sharing options...
Psycho Posted August 7, 2009 Share Posted August 7, 2009 EDIT: nm Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.