Multiple posting using JavaScript
Posted: Sun Mar 21, 2004 5:42 pm
Dear All
This code, amongst other code, is enclosed by a FORM with the name 'datapost'. The idea of this is to enable me to use image-based buttons to submit the values in various INPUT objects on the page to different URLs.
However, IE is telling me that this script is causing errors. Can anyone tell me what's wrong?
If this is not the way to do it, can anyone tell me another way to do it?
Many thanks
Mark
Code: Select all
<TD HEIGHT="30" WIDTH="80" BGCOLOR="#000066" STYLE="padding-left:15px" ALIGN="CENTER"><INPUT TYPE="hidden" NAME="input2" VALUE=""/><A HREF="javascript:document.datapost.input2.value='preview';document.datapost.action="run2.php?p=24";document.datapost.submit()"><IMG SRC="preview.jpg" STYLE="border:none"></A></TD>
<TD HEIGHT="30" WIDTH="515" BGCOLOR="#000066" STYLE="padding-left:15px"><INPUT TYPE="hidden" NAME="input3" VALUE=""/><A HREF="javascript:document.datapost.input3.value='clear';document.datapost.action="run2.php?p=26";document.datapost.submit()"><FONT COLOR="#FFFFFF"><IMG SRC="clear.jpg" STYLE="border:none"></A></TD>
<TD HEIGHT="30" WIDTH="85" BGCOLOR="#000066" STYLE="padding-right:10px" ALIGN="CENTER"><A HREF="javascript:document.datapost.input4.value='submit';document.datapost.action="run2.php?p=25";document.datapost.submit()"><IMG SRC="submit.jpg" STYLE="border:none"></A></TD>However, IE is telling me that this script is causing errors. Can anyone tell me what's wrong?
If this is not the way to do it, can anyone tell me another way to do it?
Many thanks
Mark