Click to See Complete Forum and Search --> : dropdown/jump menu not working


tbailey1027
12-09-2004, 12:50 AM
e

tbailey1027
12-09-2004, 02:12 PM
i

NogDog
12-09-2004, 02:49 PM
For the onClick property of the button, there is a line break in the middle of the object/method identifier you're using to specify the new location. I'm wondering if that's allowed in JavaScript?

tbailey1027
12-09-2004, 04:25 PM
i

tbailey1027
12-10-2004, 03:11 PM
i

NogDog
12-10-2004, 03:54 PM
The only thing that comes to mind would be to let PHP do the work instead of JavaScript (with the added benefit of making it work for all browsers instead of the 90% or so with JS enabled).

All it would take would be changing the FORM tag to...

<form action="staff.php" method="post" name="nameform">

...and change the button INPUT to a SUBMIT...

<input name="button2" type="submit"
style="BACKGROUND: #ebebeb; COLOR: #9e1441; FONT-FAMILY:
Times New Roman; FONT-SIZE: 12px" value="Go">

Then, at the top of your page before any output, add something like...

<?php
if(isset($_POST['tanyasmenu'])
{
header("Location: http://www.foxrehab.org/staff.php" . $_POST['tanyasmenu']);
exit; # make sure nothing else gets processed
}
?>

tbailey1027
12-14-2004, 04:18 PM
l

NogDog
12-14-2004, 04:34 PM
Originally posted by tbailey1027
should I put this code in the body or the head:

<?php
if(isset($_POST['tanyasmenu'])
{
header("Location: http://www.foxrehab.org/staff.php" . $_POST['tanyasmenu']);
exit; # make sure nothing else gets processed
}
?>

todd
It should be at the very beginning of the file, before any HTML code or anything else that would generate output.