secret killer agent roboc Posted August 9, 2008 Share Posted August 9, 2008 hi I'm new here, and new to php so please be gentle. I'm not totally sure php is the answer to my question, but here goes. I have 2 divs on my site. One div, called categories, contains a static, unordered list of hyperlinks: link1, link2, link3... etc. The other div, resources, loads a different unordered list of links dynamically based upon what link is clicked in "categories." Ideally, when a user clicks link1 in "categories" an unordered list of links would appear in "resources"- link1a, link1b, link1c... etc. Same for when link2 is clicked, only the ul would contain link2a, link2b, link2c data. Can this be done with php? I'm not looking for code, but more an idea of how it should be structured. Thanks, skarg Link to comment https://forums.phpfreaks.com/topic/118957-displaying-dynamic-data-in-div-on-same-page/ Share on other sites More sharing options...
genericnumber1 Posted August 9, 2008 Share Posted August 9, 2008 If you don't mind a page load, then yes, php is your guy (girl?). If you don't want a page load you'll have to pair php with javascript (ajax) to get what you want done. Link to comment https://forums.phpfreaks.com/topic/118957-displaying-dynamic-data-in-div-on-same-page/#findComment-612539 Share on other sites More sharing options...
secret killer agent roboc Posted August 9, 2008 Author Share Posted August 9, 2008 thanks for the quick reply. what a great forum. avoiding a page load would be the best. so i guess javascript is the way to go. but i'm still without the next step. how? thanks so much for your help. Link to comment https://forums.phpfreaks.com/topic/118957-displaying-dynamic-data-in-div-on-same-page/#findComment-612547 Share on other sites More sharing options...
genericnumber1 Posted August 9, 2008 Share Posted August 9, 2008 http://www.google.com/search?hl=en&safe=off&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=aKv&q=ajax+php&btnG=Search Or for the lazy (me): http://www.prototypejs.org/ Link to comment https://forums.phpfreaks.com/topic/118957-displaying-dynamic-data-in-div-on-same-page/#findComment-612549 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.