View Single Post
  #2 (permalink)  
Old Sep 27th, 2004, 18:16
spinal007's Avatar
spinal007 spinal007 is offline
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,650
Blog Entries: 1
Thanks: 0
Thanked 4 Times in 4 Posts
NOT TESTED!!!!!!

Code: Select all
<SCRIPT language="JScript>
function Validate(str){
 if(str=="disapprove"){
  document.getElementById('reason').readonly = false;
  document.getElementById('reason').value = '';
  alert('give me a reason!!!!!!!');
 }
 else if(str=="approve"){
  document.getElementById('reason').value = 'YOUR BOOKING HAS BEEN PROCESSED!!!!!';  
  document.getElementById('reason').readonly = true;
 }
 else{ // pending, do nothing
  
 }
}
</SCRIPT>
<SELECT id="status" name="bnBookingStatus" onChange="Validate(this.value)">
 <option value="pending">pending</option>
 <option value="disapprove">disapprove</option>
 <option value="approve">approve</option>
</SELECT>



<input id="reason" type="text" name="bnReason" size="35">