form reloads itself when action is set to another page

A

AC

Hi,

I have the following code for my form, which is supposed to update a
grade integer field and a text area, but when I click the submit
button, instead of sending the user to the page
gradebook_modify_proc.jsp, it just reloads the current page
(gradebook_modify.jsp).

<html>
<head>
<title>Modify Grade</title>
</head>
<FORM method="post"
action="gradebook_modify_proc.jsp?c_id=211&a_id=1519&receiptUrl=null&source=cp_gradebook_modifyGrade"
ENCTYPE="multipart/form-data" name="mainForm">
<input type="hidden" name="remove_file_id" value="">
<input type="hidden" name="add_file" value="">

<table cellspacing="0" border="0" cellpadding="5" >
<tr>
<td width="*" align="left" valign="top" nowrap><span
class="label">Grade</span>&nbsp;</td>
<td width="100%" align="left" valign="top"><INPUT NAME="grade"
TYPE="text" SIZE="6" value="13"> out of 15.0</td></tr>
<tr>
<td width="*" align="left" valign="top" nowrap><span
class="label">Comments</span>&nbsp;</td>
<td width="100%" align="left" valign="top">
<textarea name="comments"
rows="8"
cols="40"
wrap="soft"></textarea>
</td></tr>
</table>

<table cellspacing="0" border="0" cellpadding="5" width="100%">
<tr>
<td colspan="3" align="right" width="100%">
<a
href="gradebook_modify.jsp?c_id=211&s_id=231&a_id=1519&l_id=261&cmId=221&oId=261&method=modify&receiptUrl=null"><img
ALT="Cancel" name="img_cancel"
src="/images/ci/formbtns/cancel_off.gif?c_id=211" BORDER="0"
HSPACE="5"></a>

<INPUT TYPE="image" ALT="Submit" name="submit"
src="/images/ci/formbtns/submit_off.gif?c_id=211" BORDER="0"
HSPACE="5">
</td>
</tr>
</table>

</FORM>
</body>
</html>

Anybody have an idea of why?

Thanks in advance,
Allen
 
A

AC

Just cleaning up the code a little bit...

<html>
<head>
<title>Modify Grade</title>
</head>
<FORM method="post" action="gradebook_modify_proc.jsp"
ENCTYPE="multipart/form-data" name="mainForm">

<input type="hidden" name="remove_file_id" value="">
<input type="hidden" name="add_file" value="">

<table>
<tr>
<td>Grade</td>
<td><INPUT NAME="grade"TYPE="text" SIZE="6" value="13"> out of
15.0</td>
</tr>
<tr>
<td>Comments</td>
<td><textarea name="comments"</textarea></td>
</tr>
</table>

<table>
<tr>
<td>
<a href="gradebook_modify.jsp"><img ALT="Cancel" name="img_cancel"
src="/images/cancel_off.gif"></a>

<INPUT TYPE="image" ALT="Submit" name="submit"
src="/images/submit_off.gif">
</td>
</tr>
</table>

</FORM>
</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top