• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Button value is not getting passed when submit button is disabled

 
SuprajaY Yasoda
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need some suggestions from you experts. I am disabling my submit button when it is clicked once to avoid double submission, but by doing this it's value is not passing to action bean. Please suggest me.
This is javascript code

function doSubmit(submitValue,btnName) {
document.forms[0].strSubmit.value = submitValue;
document.forms[0].submit();
btnName.disabled = true;
alert(document.forms[0].strSubmit.value)
}


alert in my function gives me the exact value but it is not reaching there. I did these for 4,5 JSP's but its not working only for one JSP only. Please suggest me. It's really urgernt for me
[ October 23, 2005: Message edited by: Bear Bibeault ]
 
merwin pinto
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
the problem with the code is that ..... you have sumitted the form (document.forms[0].submit() and then you are putting the alert ...
try putting the alert before you submit the form .... since you are submitting the form the button value maybe is getting reset ...
 
SuprajaY Yasoda
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

Thanks a lot for the reply. I placed the alert before and after submitting the form, at both places I can get the value, which Submit button needs to submit.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic