Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have 2 popup box 1]ADD 2]EDIT
both popup box access same dropdown box
when i click EDIT popup box dropdown has enable false
and when click ADD popup box dropdown has enable true
how it done?
Posted
Comments
jaideepsinh 26-Mar-14 3:38am    
Do you use same popup or both different for both?

javascript code

JavaScript
<script>
function disable()
{
document.getElementById("mySelect").disabled=true;
}
function enable()
{
document.getElementById("mySelect").disabled=false;
}
</script>


html code

HTML
<select id="mySelect">
  <option>Apple</option>
  <option>Pear</option>
  <option>Banana</option>
  <option>Orange</option>
</select>
<br><br>
<input type="button" onclick="disable()" value="Disable list">
<input type="button" onclick="enable()" value="Enable list">
</br></br>


Enable desable dropdownlist[^]
 
Share this answer
 
Comments
Rajnish D mishra 26-Mar-14 3:42am    
Can we Call multiple JavaScript on ONCLICK ?in single button .if yes so how?
Nirav Prabtani 28-Mar-14 3:07am    
try this..


function func1() {
alert("1");
func2();
}
function func2()
{
alert("2");
}


<input type="button" önclick="func1()" value="Disable list">
Hi Rajnish,


"Can we Call multiple JavaScript on ONCLICK ?in single button .if yes so how?"



you can call two different javascript function with single button click, here is example...




C#
function func1() {
   alert(1);
}

function func2() {
   alert(2);
}



HTML
<input type="button" id="btn" value="Click" onclick="func1();func2();" />
 
Share this answer
 
Comments
Rajnish D mishra 26-Mar-14 4:53am    
its working fine but disable going again.....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900