Sunday 15 January 2012

javascript - Html confirmation popup on submit button -


In my application, I have submitted a button that says the shop process in my DB on the same page, in which one The text box is where its data are required. I used the required field validate for that textbox. And confirm the Ajax confirmation item and the verification box for submitting my box. If the text box is empty I need to check whether the text box has been filed with the data firs and after the creation, the button is set to fire needed. I do not want popup fire before required field verification

You can use something like this

  var button = document.getElementById ('button'); // or whatever ID your button contains var textbox = document.getElementById ('textbox'); // or whatever ID is in your input button. Click on = function () {if (textbox.value === "") {return false; } And {return true; }}    

No comments:

Post a Comment