Chris_m
asked on
window.history.back(-1) question
I have a text input box in a form which, when the submit button is pressed, calls an ASP page for processing. When the processing is complete, I use window.history.back(-1) to go back to the page with the form, is there any way that I can have the text input box automatically clear its contents when it is displayed again?
yes, you can use ASP command "expire" of the page
Just replace the streings with the correct names
function document_onload()
{
document.forms["formname"] ["textboxn ame"].valu e="";
}
window.onload=document_onl oad;
Regards,
CJ
function document_onload()
{
document.forms["formname"]
}
window.onload=document_onl
Regards,
CJ
ASKER
For ianlesoft:
I am not sure how to ue the expire command
for CJ S:
that would work fine except that the Input box is initially populated with a value obtained from a SELECT box on another ASP page
<INPUT ID="NameAfterChange" NAME="selectedName" VALUE="<%Response.Write(Re quest.Form ("selected Name"))%>" >
and if I use your code, the initial value is also cleared. I only want the box to be cleared when I return to it, not when I initialy go to it.
regards
I am not sure how to ue the expire command
for CJ S:
that would work fine except that the Input box is initially populated with a value obtained from a SELECT box on another ASP page
<INPUT ID="NameAfterChange" NAME="selectedName" VALUE="<%Response.Write(Re
and if I use your code, the initial value is also cleared. I only want the box to be cleared when I return to it, not when I initialy go to it.
regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.