Select Box Enable Disable Script

In this Select Box Enable Disable Script is used to enable or disable a select or drop down or Combo box on this browser.

Demo :



Select Box :     

Example :

You just click in Disable button then ask confirm message is like "Are You Sure?, You Want to Disable This Select Box". If you click which confirm ok button select box will be disable. This will happen again and again based on your enable and diable clicking button.

Code :

Following code is disable and enable for a select box.If you need to copy and use it.


<?php
function disable_enable_fun()
{
  if(document.getElementById('button').value =='Disable')
  {
    document.getElementById('enable_disable_fun').disabled = true;
    document.getElementById('button').value ='Enable';
  }
  else
  {
    document.getElementById('enable_disable_fun').disabled = false;
    document.getElementById('button').value ='Disable';
  }
}
?>

In the above disable_enable_fun() function have using to disable and enable for a select box.When you click in the Disable button will execute disable_enable_fun() function and in the select box will disabled and button value will change to Enable.

Free Download Script:

If you need to Select Box Enable Disable Script click and download from following zip file.

Download




Content