CPOsosky,
I don't exactly understand ur comment . Please elaborate.
Thanks for helping me.
Main Topics
Browse All TopicsIt seems my javascript functions are not being able to get invoked. When i call a certain function on some user action it seems the control does not seem to go to the function. I confirmed this by putting an alert in first line of a function but that doesn't work either. What do u think i am possibly doing wrong. The way i call my function is :
<select size="1" NAME="status" VALUE="status" onChange="javascript: determineActiveStatus();" >
and the function itself is:
//This function disable and enable certain feilds when certain option is selected
function determineActiveStatus(){
alert('hello);
switch(document.caseupdate
case 1: document.caseupdate.pendin
document.caseupdate.reason
document.caseupdate.verbal
break;
case 2: document.caseupdate.pendin
document.caseupdate.reason
document.caseupdate.verbal
break;
default: document.caseupdate.pendin
document.caseupdate.reason
document.caseupdate.verbal
break;
}
}
Its not giving me any error but neither it is working.
Please advice.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Oh i think now i got u. Yes i do have options in the list. It goes like this:
<select size="1" NAME="status" VALUE="status" onChange="javascript:deter
<option value?? selected></option>
<option value="" >Final</option>
<option value="">No Report</option>
<option value="">Partial</option>
</select>
Sorry for not being detailed.
Any suggestions now.
This is the exact code. And what i want to do is that when i select any other option in the select box other than "Pending", the other 2 select box and input box should get disabled.
<SCRIPT LANGUAGE="JavaScript">
//This function disable and enable certain feilds when certain option is selected
function determineActiveStatus(){
alert('hello);
switch(document.caseupdate
case 1: document.caseupdate.pendin
document.caseupdate.reason
document.caseupdate.verbal
break;
case 2: document.caseupdate.pendin
document.caseupdate.reason
document.caseupdate.verbal
break;
default: document.caseupdate.pendin
document.caseupdate.reason
document.caseupdate.verbal
break;
}
}
</script>
<cfoutput><form name="caseupdate" action="" method="post" ></cfoutput>
<table><tr><td>
<fieldset ID="fld2" style="WIDTH: 550px; HEIGHT: 56px">
<LEGEND ALIGN="left"><font color="#0000FF">Case Status</font></LEGEND>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR>
<TD><font size="2"><strong>Status</s
<select size="1" NAME="status" VALUE="status" onChange="javascript:deter
<option value=?? selected></option>
<option value="" >Final</option>
<option value="">No Report</option>
<option value="">Partial</option>
</select>
</TD>
<TD> &nbs
<select size="1" NAME="pending" VALUE="pending" >
<option value?? selected></option>
<option value="">SV </option>
<option value="">Verbal Instructions</option>
<option value="">Database</option>
<option value="">Other Service Codes</option>
<option value="">Verbal Report</option>
<option value="">Other(enter in following textbox)</option>
</select>
</TD>
</TR>
<tr>
<TD><table><tr><td><strong
<td><input type="text" name="reason"></td></tr></
<TD><table><tr><td><strong
<td><select size="1" NAME="verbalreport" VALUE="pending" >
<option value=""></option>
<option value="">Yes</option>
<option value="">No</option>
<option value="">N/A</option>
<option value="">Left a VM</option>
<option value="">Sent Email</option></td></tr></
</tr>
</TABLE>
</fieldset>
</td></tr></table>
</form>
If I understood you correctly, your code seems to work.
When I select "partial" off the drop down, the input box
and the other 2 drop downs are disabled. Although the first
option on your drop down is blank, you have a couple of
question marks for the value. And your still missing the
closing quote on your alert, which will probably cause
an error when the page loads.
-CPOsosky
I figured out what is the problem. The cause of the problem was not this peice of code which i sent u. It is actually the foll. peice of code. This function is suppose to disable certain feilds when i check a particular radio button. But there is something wrong i am doing here. Can u help me with this one.
function deactivate(){
alert('hello');
if(document.caseupdate.vid
document.caseupdate.video[
document.caseupdate.timeIn
document.caseupdate.hours.
document.caseupdate.mins.d
document.caseupdate.sec.di
break;
}
}
**************************
******PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER******
**************************
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area:
RECOMMENDATION:
- [Points to CPOsosky Grade B]
Please leave any comments here within the next seven days.
**************************
******PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER******
**************************
jAy
EE Cleanup Volunteer
Business Accounts
Answer for Membership
by: CPOsoskyPosted on 2003-02-18 at 09:51:33ID: 7975840
Put some options on your list. The "OnChange" event
isn't going to execute unless you can switch between
values on the list. (and your missing the closing quote
on your alert).
-CPOsosky