I know this isn't a php group but I was wondering if my problem is with my
javascript in my php code. I'm debugging someone else's code and I can't
figure out why this form won't submit.
This code doesn't do anything:
<?PHP
$var1 = "http://localhost/php/index.php";
$varx = "bruce";
echo "<form name='formx3' method='post'>< input type='text'><in put
type=button value=go onclick=documen t.formx3.action ='".$var1."';
document.formx3 .submit();></form>";
?>
This code works, but I want to know why the above code doesn't.
<?PHP
$var1 = "http://localhost/php/index.php";
$varx = "bruce";
echo "<form name='formx2' action='".$var1 ."'><input type='text'><in put
type=button value=go onclick=documen t.formx2.submit ();></form>";
?>
It seems awful weird to even try to assign the forms action and then submit
it all in the onclick event...are you allowed to do this in Javascript?
Thanks in advance...
-Bruce
javascript in my php code. I'm debugging someone else's code and I can't
figure out why this form won't submit.
This code doesn't do anything:
<?PHP
$var1 = "http://localhost/php/index.php";
$varx = "bruce";
echo "<form name='formx3' method='post'>< input type='text'><in put
type=button value=go onclick=documen t.formx3.action ='".$var1."';
document.formx3 .submit();></form>";
?>
This code works, but I want to know why the above code doesn't.
<?PHP
$var1 = "http://localhost/php/index.php";
$varx = "bruce";
echo "<form name='formx2' action='".$var1 ."'><input type='text'><in put
type=button value=go onclick=documen t.formx2.submit ();></form>";
?>
It seems awful weird to even try to assign the forms action and then submit
it all in the onclick event...are you allowed to do this in Javascript?
Thanks in advance...
-Bruce
Comment