Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resubmit Problem Help!

Status
Not open for further replies.

gokeeffe

Programmer
Jan 11, 2005
170
IE
Hi,
For some reason that I can't figure the code below does not work, trying to resbmit the page using the onchange function. I get an error stating 'method or form not supported', finding it impossible to solve this one, need some help if possible, thanks

------------- Code --------------------------------------

<script language = "JavaScript">
function resubmit()
{
document.signup.action="step1.php"
document.signup.submit()
}
</script>

<form name = "signup" id="signup" action= "<?php echo $_SERVER['PHP_SELF'];?>" method="post">

<?php

/********************************************* DROP DOWN FOR SECONDARY EXAM *******************************************/



$ak="3";

echo'<table align="center">';

if(isset($_POST['secondary_exam_id']))

$_SESSION['secondary_exam_id']=$_POST['secondary_exam_id'];

echo'<tr>
<td colspan="2" class="labelcell">
<label for="secondary_exam_id">* Select Curriculum:</label></td>';

echo'<td colspan="2" class="fieldcell2"> <select name="secondary_exam_id" onchange="resubmit()">';

$query_result = mysql_query ('SELECT * FROM secondary_exam_type ORDER BY secondary_exam_id');

while ($row = mysql_fetch_array ($query_result, MYSQL_NUM))
{
if($row[0] == $_POST['secondary_exam_id'])
{
$checked = 'selected';
}
else
{
$checked = NULL;
}

echo "<option value=\"$row[0]\" $checked>$row[1]</option>\n";
}

echo'</select></td>';
echo'</tr>';
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top