0

I have a submit button:

<div class="submitForm"> <input type="submit" id="submit" value="SAVE" class="greyishBtn" onclick ="if(!DW_CheckIfImagesInBuffer()) {return confirm('No images'); }else{ btnUpload_onclick(2)}"/> </div> 

I'm tryng to to prevent submit form twice disabling button in this way:

else{ btnUpload_onclick(2) this.disabled=true; this.value='Please Wait...';} 

Button when submit change to Please Wait, but form is not submitted.

Any help?

TKS ALL

6
  • Missing semicolon: btnUpload_onclick(2);<- there! Commented May 28, 2013 at 0:20
  • Tks elclanrs, but not send yet... Commented May 28, 2013 at 0:22
  • your problem's probably in here ... if(!DW_CheckIfImagesInBuffer()) Commented May 28, 2013 at 0:24
  • 2
    This may be obvious, but is the button actually inside a form? Commented May 28, 2013 at 0:24
  • Mathletics, if I remove this.disabled=true; this.value='Please Wait...'; form work correctly... Commented May 28, 2013 at 0:26

1 Answer 1

2

The problem is ; in the else statement

btnUpload_onclick(2) this.disabled=true; this.value='Please Wait...'; // ^ Here ^ Like this 

Change to

btnUpload_onclick(2); this.disabled=true; this.value='Please Wait...'; 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.