PHP PRINT statement with OnChange event
From: Michelle (miki_at_spam_me.net)
Date: 10/31/04
- Next message: steve: "Re: How to create a book swapping site?"
- Previous message: Randy Jackson: "Error Logging"
- Next in thread: neur0maniak: "Re: PHP PRINT statement with OnChange event"
- Reply: neur0maniak: "Re: PHP PRINT statement with OnChange event"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 31 Oct 2004 19:10:55 GMT
I have tried every variation of the "onchange" statement below without
any actual reloading of the page. I am hoping that the PHP PRINT
statement is constructed wrong, otherwise it is javaScript error an
needs to be posted in the javaScript newsgroup.
The FireFox javaScript Console reports the following message:
Error: missing : in conditional expression
Source Code:
location.href=themes.php?scheme=(form.color_schemes.options[form.color_schemes.selectedIndex].value)
My Code for the dropdown box is:
<form name='color_schemes' method='post' action='themes.php' >
Select a scheme:
<?php
print "<select name='scheme' size='1'
onchange='location.href=themes.php?scheme=(form.color_schemes.options[form.color_schemes.selectedIndex].value)'>\n";
//populate the dropdown selector box...
$counter = 1;
foreach ($schemes as $scheme)
{
if ($selected_theme == $counter)
print "<option value = '$counter' selected>$scheme</option>\n";
else
{
print "<option value = '$counter'>$scheme</option>\n";
}
$counter ++;
}
?>
I would appreciate any advice...its probably something that is very
trivial and a very glaring defect, but I am blind to it.
Thanks,
Miki
- Next message: steve: "Re: How to create a book swapping site?"
- Previous message: Randy Jackson: "Error Logging"
- Next in thread: neur0maniak: "Re: PHP PRINT statement with OnChange event"
- Reply: neur0maniak: "Re: PHP PRINT statement with OnChange event"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]