combo & confirm

Results 1 to 2 of 2

Thread: combo & confirm

  1. #1
    Join Date
    Dec 1969

    Default combo & confirm

    I have a combo box which has values say (select one)monday,tuesday,wed....<BR>Now if I click on the button below it the value which is selected<BR>should get submitted in the database,but before it is submitted I<BR>should get message like say javascriptt&#039s confirm box asking for<BR>confirmation,if yes is clicked, value should get submitted in<BR>the database. Also if (select one) is selected in the combo I should get an alert box saying please select one.<BR>Pl could u give me an idea how to do the javascript part

  2. #2
    Join Date
    Dec 1969

    Default RE: combo & confirm

    &#060;form onsubmit="return validate(this)"&#062;<BR><BR>......<BR><BR>&#060;s cript language="javascript"&#062;<BR><BR>function validate(frm) {<BR>if(frm.elements[&#039combo&#039].selectedIndex!=0) {<BR>return confirm(&#039really submit?&#039);<BR>}<BR>else {<BR> alert(&#039no selection&#039); return false;<BR>}<BR>}<BR><BR><BR>j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts