I am making a form in an ASP page. One button will send the information, the other will reset the form. When the form is sent, all values are loaded into cookies, in case the form is incomplete and returned. When the reset button is clicked, the cookies, where the values of the form are stored, will be emptied and the page should be reloaded. How do I reload the ASP page with an ASP command?
Refresh page with ASP command
Collapse
X
-
hi there,
to reload a page after a preset delay..
Code:<META HTTP-EQUIV="refresh" CONTENT="15">
Code:<META HTTP-EQUIV="refresh" CONTENT="5; URL=http://www.somedomain.com/somepage.html">
Code:<A HREF="javascript:history.go(0)">Click to refresh the page</A>
Code:<FORM> <INPUT TYPE="button" onClick="history.go(0)" VALUE="Refresh"> </FORM>
-
Have some solution:
<script type="text/javascript">
function setr()
{DelCookie("_pa geRefresh_");do cument.cookie = "_pageRefresh_= 1;path=/;";}
function DelCookie(sName )
{document.cooki e = sName + "=; expires=Fri, 31 Dec 1980 23:59:59 GMT;";}
function CheckRefresh()
{ var aCookie = document.cookie .split("; ");
for(var i=0;i<aCookie.l ength;i++){
var aCrumb = aCookie[i].split("=");
if (aCrumb[0]=="_pageRefresh _")
{DelCookie("_pa geRefresh_");wi ndow.location.r eload(true);bre ak;}
}
}
CheckRefresh();
</script>
<a href="javascrip t:setr();histor y.go(-1);" style="padding-right:5px" title="Go Back"><img src="../images/back.gif" alt="Go Back" border="0"></a>Comment
-
excuse me guys......
im new to this... so please clear my doubt... cant we do this using viewstate??...Comment
Comment