
September 29th, 2004, 04:05 PM
|
|
Registered User
|
|
Join Date: Sep 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
HELP: problem with php, onclick function, and frames
I'm having a problem with the following bit of code and it has to do with the variable/argument in the function, however, I'm unfamiliar with how to "make it pass" correctly.
The problem is that the $id value is not set when used in the onclick function. If I call the variable (both before and after this code) outside of the onclick function, the variable displays without any problems. However, it's not getting assigned a value when it is used in the onclick function. I know the code is working otherwise because if I put a value such as "300" in place of "$id", the argument is passed to the empty.php page correctly.
I've broken up the code for easier reading/debugging and nothing more... Thanks for any help that may be provided, Dallas.
echo "<input type=\"submit\" value=\"Save\" name=\"save\"";
if (!isset($previous))
{
echo "onClick='parent.bottom_frame.location.href=\"empty.php\?id\=";
echo "$id";
echo "\"'";
}
echo ">";
|