Im lost in my own code. I want to have a dropdown list in an UPDATE form. And i have this code that is supposed to check if the the user's department is "CCC" disable the dropdown called Status, else, enable it. But I want to call this function everytime i select something from the RO_AppNum dropdown. And i also want it to run when the page is loaded.
function bloquiar()
{
var NewStatus=document.getElementById("EditRecordStatus");
var dep=document.getElementById("EditRecorddepartamento").value;
var d1=document.getElementById("EditRecordRO_AppNum").value;
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
anibaldps
Help!
Im lost in my own code. I want to have a dropdown list in an UPDATE form. And i have this code that is supposed to check if the the user's department is "CCC" disable the dropdown called Status, else, enable it. But I want to call this function everytime i select something from the RO_AppNum dropdown. And i also want it to run when the page is loaded.
function bloquiar()
{
var NewStatus=document.getElementById("EditRecordStatus");
var dep=document.getElementById("EditRecorddepartamento").value;
var d1=document.getElementById("EditRecordRO_AppNum").value;
if(dep == "CCC"){
NewStatus.disabled = true;
}
else{
NewStatus.disabled = false;
}
}
window.onload=bloquiar;
document.getElementById("caspioform").d1.onchange=bloquiar;
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.