Google dot what?
Posts: 2
16 credits Members referred : 0
« on: Feb 18, 2008, 05:20:29 am »
I know very little about PHP and I'm wondering how to create a simple drop-down menu. I have a menu created using javascript but I was wondering if it's possible to create the same menu using PHP? Maybe that's not what PHP is inteded for. Just curious. Thanks!
Here's the javascript menu...
<script type="text/javascript"> <!-- window.onload=show; function show(id) { var d = document.getElementById(id); for (var i = 1; i<=10; i++) { if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';} } if (d) {d.style.display='block';} } //--> </script>
Global Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #1 on: Feb 18, 2008, 12:18:37 pm »
Hi,
what do you need a dynaic menu based on some data from a database or just the javascript effect?
PHP doesn't has client effects like you have posted above
Google dot what?
Posts: 2
16 credits Members referred : 0
« Reply #2 on: Feb 18, 2008, 05:40:11 pm »
Really I just wanted the javascript effect. My thinking was, and I'm sure it's flawed, that if I could use php to make the drop-down menu then I wouldn't have to worry about all of the viewers who have javascript disabled in their web browser. Am I going down the wrong path??
Global Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
Really I just wanted the javascript effect. My thinking was, and I'm sure it's flawed, that if I could use php to make the drop-down menu then I wouldn't have to worry about all of the viewers who have javascript disabled in their web browser. Am I going down the wrong path??
yes
Javascript is executed in the users browser and php on the server
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7595