28, May 2012

Drop-Down Menu - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: Drop-Down Menu
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: Drop-Down Menu  (Read 1461 times)
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>

and the html....

<div class="menu1">
<span onmouseover="javascript:show('smenu1');">Menu 1</span><br />
<span class="submenutext" id="smenu1" onmouseover="javascript:show('smenu1');" onmouseout="javascript:show('');">
<a href="#">Sublink1.1</a><br />
<a href="#">Sublink1.2</a><br />
<a href="#">Sublink1.3</a><br />
<a href="#">Sublink1.4</a><br />
</span>
</div>
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
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: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Feb 18, 2008, 08:45:37 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??

yes Cheesy

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
Tags : drop-down menu Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: Drop-Down Menu
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 09:52:00 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.