S
sujith.bolar
Hello
I am using a <form method="post"> to submit values to the processing
agent. If the processing agent returns an error, I call the
history.go(-1) or history.back() function to reload the page. The page
does reload but all the values entered disappears.
I am using Java Script and html.
Code:
---------------------
I am filling in the form in "name.html" file.
</head>
<body class="main" onload='startup()'>
<center>
<form method="post" name="example" id="example">
<table>
<tr>
<td>Name:</td>
<td> </td>
<td><input type="text" name="name" size="64"
maxlength="64"></td>
</tr>
</table>
</form>
</center>
</body>
</html>
When the processing agent return error, the page is redirected to
"error.html " where the code looks like below:
<script type="text/javascript">
<!--
function submit()
{
history.go(-1); // I tried history.back() too but no luck
}
-->
</script>
</head>
<body class="main">
<br>
<br>
<table>
<tr>
<td>
<center>
<table>
<caption class="cap">Error</caption>
<tr><td> WRONG NAME </td></tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td>   </td>
<td width="100">
<div id="okButton" class="tbutton"
onmouseup='submit()' Ok </div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
In case an error is thrown, the name.html is loaded as expected but I
lost the values entered in the form.
What should I do to store the values ?
Thanks
I would appreciate any help/repsonse to my question.
- Sujith
I am using a <form method="post"> to submit values to the processing
agent. If the processing agent returns an error, I call the
history.go(-1) or history.back() function to reload the page. The page
does reload but all the values entered disappears.
I am using Java Script and html.
Code:
---------------------
I am filling in the form in "name.html" file.
</head>
<body class="main" onload='startup()'>
<center>
<form method="post" name="example" id="example">
<table>
<tr>
<td>Name:</td>
<td> </td>
<td><input type="text" name="name" size="64"
maxlength="64"></td>
</tr>
</table>
</form>
</center>
</body>
</html>
When the processing agent return error, the page is redirected to
"error.html " where the code looks like below:
<script type="text/javascript">
<!--
function submit()
{
history.go(-1); // I tried history.back() too but no luck
}
-->
</script>
</head>
<body class="main">
<br>
<br>
<table>
<tr>
<td>
<center>
<table>
<caption class="cap">Error</caption>
<tr><td> WRONG NAME </td></tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td>   </td>
<td width="100">
<div id="okButton" class="tbutton"
onmouseup='submit()' Ok </div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
In case an error is thrown, the name.html is loaded as expected but I
lost the values entered in the form.
What should I do to store the values ?
Thanks
I would appreciate any help/repsonse to my question.
- Sujith