Jump to content

Adding checkbox (I agree) on popup


dardime

Recommended Posts

Hi i need help in adding a checkbox saying I AGREE on my popup. Thank you in advance.

 

Here is my code below:

 


$('#working_days').change(function(){
    if($(this).val()=="2 to 3"){
        alert("Please inform the customer that the time starts once the job has been assigned to the technician. If this Job is assigned after 3pm the timeframe starts from the next working day")
    }
    else if($(this).val()=="3 to 5"){
        alert("Please inform the customer that the time starts once the job has been assigned to the technician. If this Job is assigned after 3pm the timeframe starts from the next working day")
    }
    else if($(this).val()=="5 to 7"){
        alert("Please inform the customer that the time starts once the job has been assigned to the technician. If this Job is assigned after 3pm the timeframe starts from the next working day")
    }
else if($(this).val()=="Others"){
        alert("Please inform the customer that the time starts once the job has been assigned to the technician. If this Job is assigned after 3pm the timeframe starts from the next working day")
    }
})   

 


<select name="working_days" id="working_days" class="requiredField">
        <option value="">Select working days</option>
        <option value='2 to 3'>2 to 3</option>
<option value='3 to 5'>3 to 5</option>
<option value='5 to 7'>5 to 7</option>
<option value='Others'>Others</option>
 </select>

Link to comment
Share on other sites

  • 2 weeks later...

If you don't want to use a plugin (though a plugin like psycho suggested look much nicer and have much more capabilities) You can use a javascript confirm box: http://www.w3schools.com/jsref/met_win_confirm.asp

 

IE:

 

 

var txt;
var r = confirm("Agree or Disagree!");
if (r == true) {
    txt = "You Agreed!";
} else {
    txt = "You Disagreed!";
}
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.