Scip Posted June 15, 2009 Share Posted June 15, 2009 I want to achieve a menu like the one in the following page, where when you click on the take the contents of the box below changes. You can see how it works on this site : http://www.jeremymartin.name/projects.php?project=kwicks I also very new to javascript, i basically read about the syntax and a few functions but i want to something similar to an item basket where when you click on something information about that item will appear in a box on the same thing. thanks in advance. Link to comment https://forums.phpfreaks.com/topic/162234-how-to-achieve-something-like-this/ Share on other sites More sharing options...
jxrd Posted June 15, 2009 Share Posted June 15, 2009 You can do it two ways, create an element/update it's html, or just show/hide various elements. You can use element.style.display = 'block'; to display it, and display = 'none'; to hide it. Just like in CSS. You can also update the parent container's content, like parent.innerHTML = 'new content';. Hope this helps. Link to comment https://forums.phpfreaks.com/topic/162234-how-to-achieve-something-like-this/#findComment-856224 Share on other sites More sharing options...
Scip Posted June 15, 2009 Author Share Posted June 15, 2009 Thanks for the quick reply but if you could point me towards an example that would be fantastic. Link to comment https://forums.phpfreaks.com/topic/162234-how-to-achieve-something-like-this/#findComment-856259 Share on other sites More sharing options...
jxrd Posted June 15, 2009 Share Posted June 15, 2009 hide/show http://www.astahost.com/info.php/Javascript-Hide-Show-Element-Css_t11957.html innerHTMl http://www.tizag.com/javascriptT/javascript-innerHTML.php Those were all found on google. You can use it too Link to comment https://forums.phpfreaks.com/topic/162234-how-to-achieve-something-like-this/#findComment-856262 Share on other sites More sharing options...
Scip Posted June 15, 2009 Author Share Posted June 15, 2009 fantastic thanks Link to comment https://forums.phpfreaks.com/topic/162234-how-to-achieve-something-like-this/#findComment-856323 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.