View Single Post
Old 11-25-2012, 06:30 AM   PM User | #1
shaunthomson
New Coder

 
Join Date: May 2012
Posts: 88
Thanks: 51
Thanked 0 Times in 0 Posts
shaunthomson is an unknown quantity at this point
history.back() and jquery question

Hi

I want to display a 'loading' gif when someone submits my form (the form submits to another page on the site).

I've managed to do it, but if someone clicks the browser back button after submitting the form, the loading gif is still displayed...

Function:
Code:
function loadSubmit() {
$('#progress').show();
}
Form:
Code:
<form class="form1"action=""method="post"><input type="text"name="c"id="c"onFocus="this.selectionStart=0;this.selectionEnd=this.value.length;"onMouseUp="return false"VALUE="or 'g' to see gig guide"/><input type="image"name="submit"id="submit"height="31"src="images/g.png"style="margin-left:5px" onclick="return loadSubmit()"/></form>
Is there a way to reset the gif to display:none somehow when you land on the page from the back button.
shaunthomson is offline   Reply With Quote