Cybercrux

Everything is achievable through technology

Droupdown

Droupdown Common Functions
1. //Validation
qualification = document.getElementById(‘ddlQualification’);
var Temp = qualification.options[qualification.selectedIndex].value;
if (Temp == “0”) { alert(“Please select Qualification”); qualification.focus(); return false; }

2. Load values to droupdown using ajax
var DAYTMP = document.getElementById(‘ddlDay’);
var DAY = DAYTMP.options[DAYTMP.selectedIndex].value;
var Tm2ary = (“12:00 to 12:30 PM,12:30 to 1:00 PM,1:00 to 1:30 PM,1:30 to 2:00 PM”).split(“,”);
TMETMP.options.length = 0; //reset
var optn = document.createElement(“OPTION”);
optn.text = “—-Select Time—-“; //add select
optn.value = “0”
TMETMP.options.add(optn);
if (DAY == “Saturday”) {
for (var j = 0; j < Tm2ary.length; j++) {
var optn = document.createElement(“OPTION”);
optn.text = Tm2ary[j];
optn.value = Tm2ary[j];
TMETMP.options.add(optn);
}
}

Advertisements

One thought on “Droupdown

  1. All click fire in select option
    //$(document).on(“click”, “.selectpicker”, function () {
    // if ($(this).data(‘open’) == ‘false’) { // Close Event of Usergroup
    // $(this).parent().hide().removeClass(“in”);
    // $(this).data(‘open’, ‘true’);
    // } else { // Open Event of Usergroup
    // $(this).data(‘open’, ‘false’);

    // }
    //})

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s