This is javascript
Code:<script type="text/javascript"> function defaultfn(){ var x=document.getElementById('task'); x.disabled=true; var y=document.getElementById('category'); y.disabled=true; } function enabledorpdown(){ var a = document.getElementsByName('cb'); var x=0; for(var i=0; i<a.length; i++){ if(a[i].checked){ x=1; break; } } if(x==1){ var x=document.getElementById('task'); x.disabled=false; var y=document.getElementById('category'); y.disabled=false; return true; }else{ var x=document.getElementById('task'); x.disabled=true; var y=document.getElementById('category'); y.disabled=true; alert('please select record'); return true; } return false; } function gofunction(){ var x = document.getElementById('status').value; if(x!="select"){ window.location = "showData1.jsp?status="x; }else{ alert('please select status'); } } </script>Code:<td width="70%" align="center" height="400px"> <div align="left" style="margin-left: 100px"> <select id="task" style=""> <option value="select">-select-</option> <option value="move">move to</option> <option value="copy">copy to</option> </select> <select id="category"> <option value="select">-select-</option> <option value="student">Student</option> <option value="hod">HOD</option> <option value="professor">Professor</option> </select> <input type="button" value="done" onclick=""></input> </div> <div align="left" style="margin-left: 690px;margin-top: -26px"> Status Type: <select id="status" style=""> <option value="select">-select-</option> <option value="active">Active</option> <option value="inactive">Inactive</option> </select> <input type="button" value="Go" onclick="gofunction();"></input> </div>


Reply With Quote

Bookmarks