Jump to content

Php and mysql


sridhar golyandla

Recommended Posts

hi 2 all,

i am new to php and mysql...

please any body can help me out, egarly waiting for the solution...

 

how to active and deactivate the 2nd and 3rd dropdown boxes for selecting a particular first dropdown value. the 2nd and 3rd dropdowns are related to 1st dropdown and the values are posted from backend ie DB.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/134972-php-and-mysql/
Share on other sites

Example JavaScript:

function seled(){
     var d1= document.getElementById("drop1");
     var d2= document.getElementById("drop2");
     var d3= document.getElementById("drop3");
     if(d1 != ''){
          d2.enabled = true;
          d3.enabled = true;
     }else{
          d2.enabled = false;
          d3.enabled = false;
     }
}

 

Example HTML:

<form action="javascript:void(0);" method="post">
<select onchange="seled()" id="drop1">
     <option value="">Select Value</option>
     <option value="1">1</option>
     <option value="2">2</option>
     <option value="3">3</option>
</select>
<select onchange="seled()" id="drop2">
     <option value="">Select Value</option>
     <option value="1">1</option>
     <option value="2">2</option>
     <option value="3">3</option>
</select>
<select onchange="seled()" id="drop3">
     <option value="">Select Value</option>
     <option value="1">1</option>
     <option value="2">2</option>
     <option value="3">3</option>
</select>
</form>

Link to comment
https://forums.phpfreaks.com/topic/134972-php-and-mysql/#findComment-703040
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.