Forum Moderators: phranque

Message Too Old, No Replies

Javascript to PHP link

linking a javascript pull down menu to a php file/

         

webaddiction

2:30 am on Aug 18, 2003 (gmt 0)

10+ Year Member



Hi there,
I'm creating a web site that has a javascript pull-down-menue. I would like to link each of the menu buttons to a .php file, but don't don't know how to do it. Any hints or helps would greately appreciate it.

Thanks.

willybfriendly

2:35 am on Aug 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why not just use the .php file extension? Or, am I missing something here?

WBF

webaddiction

4:25 am on Aug 18, 2003 (gmt 0)

10+ Year Member



yes, you are missing something. I created a javascript pull-down menu, and for each button in that pull down menu i want to link it to the .php file, which is a gallery page.

Thanks for the fast relay.

MonkeeSage

4:53 am on Aug 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



webaddicition:

Can you post the relevant part of the code? I'm having trouble understanding what you mean also.

Jordan

willybfriendly

4:56 am on Aug 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yes, you are missing something. I created a javascript pull-down menu, and for each button in that pull down menu i want to link it to the .php file, which is a gallery page.

How are you linking to .html files? Something like href="somePage.html"? Just do a href="somePage.php" and all should be fine. Your server should understand the extension.

WBF

webaddiction

6:14 am on Aug 18, 2003 (gmt 0)

10+ Year Member



JAVASCRIPT INSIDE INDEX.HTML

<td><a href="#" onMouseOut="MM_swapImgRestore();MM_startTimeout();" onMouseOver="MM_showMenu(window.mm_menu_0814004458_0,0,27,null,'button_r1_c2');MM_swapImage('button_r1_c2','','image/jsbutton/button_r1_c2_f2.gif',1);"><img name="button_r1_c2" src="image/jsbutton/button_r1_c2.gif" width="83" height="27" border="0" alt=""></a></td>

This is my product javascript button, However, for its pull down menue i have "marble, granite, limesone, and traveltine" button. I understand what your trying to say but where in the above script i can put a seperate link to each of the button to spgm.php?

Thanks for your self!

willybfriendly

6:46 am on Aug 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



onMouseOver="MM_showMenu(window.mm_menu_0814004458_0,0,27,null,'button_r1_c2')

Bear in mind, I am not a JS whiz (not even a neophyte). Doesn't that bit of code cause the "real" menu to open up? That, I would guess, is where the links to your other files is at, that is, in the mm_menu... object. Are there href's there?

WBF

webaddiction

7:29 am on Aug 18, 2003 (gmt 0)

10+ Year Member



willybfriendly: you are right about the href and i have tried that however, only the products page gets a link to the spgm.php page. I opened up this file "mm_menu.js" to see if there is any href available, but couldn't find any.

This is what i can to to

PRODUCTS dropes down to
MARBLE->SPGM.PHP
GRANITE->SPGM.PHP
TRAVELTINE->SPGM.PHP
LIMESTONE->SPGM.PHP

Thanks.