asp.net - Jquery shows image for few seconds then hides -


i trying use jquery display image when button clicked. displays image page refreshes , image gone. pretty sure issue when button clicked form.submit refreshes page, need because updating dropdown list values hidden text box text of button being pasted (the page refreshes user not have hit enter, automatically them). wondering how can both when button clicks shows image , page refreshes , image still there.

here 2 versions of function have tried , have not worked:

function movetext(text) {      document.getelementbyid("result").value=text; } function showimage()  {      $("#loadingimage").show();      return false(); } 

and other one:

function movetext(text) {      document.getelementbyid("result").value=text; }                             function showimage(event)  {      $("#loadingimage").show();      event.preventdefault(); } 

additional info:

here button code:

  <input name="failure analysis lab"     style="white-space:normal; width: 272px; height: 30px;"     onclick="movetext(this.name);showimage();    form1.submit(); " type="button"     value="7qkd failure analysis lab" /> 

i believe need add return false onclick event , remove form submit.:

onclick="movetext(this.name);showimage(); return false;"  

this keep postback occurring.


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -