![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I would appreciate help knowing what I did wrong. Here is the pertinent code: TD WIDTH=100% ALIGN=LEFT INPUT TYPE="HIDDEN" NAME="Institution" VALUE="{Individuals.CS- Appl Academic.Institution}" SIZE=32 MAXLENGTH=5 /TD |
|
TD width="100%" Input type="radio" name="addInstitution" value="Yes" onClick="choiceInstitution(this.form)" Input type="radio" name="addInstitution" CHECKED value="No" onClick="choiceInstitution(this.form)" /TD script LANGUAGE="JavaScript" void choiceInstitution(theForm) { if(theForm.addInstitution[0].checked) { document.theForm.getElementByID("Institution").vis ibility = "visible"'; } } /script |
#3
| |||
| |||
|
|
OccasionalFlyer wrote: [snip] I would appreciate help knowing what I did wrong. Here is the pertinent code: TD WIDTH=100% ALIGN=LEFT INPUT TYPE="HIDDEN" NAME="Institution" VALUE="{Individuals.CS- Appl Academic.Institution}" SIZE=32 MAXLENGTH=5 /TD An Input element of the HIDDEN type will never be displayed. You need to change this to the TEXT type and set the style attribute to "visibility:hidden;" TD width="100%" Input type="radio" name="addInstitution" value="Yes" onClick="choiceInstitution(this.form)" Input type="radio" name="addInstitution" CHECKED value="No" onClick="choiceInstitution(this.form)" /TD script LANGUAGE="JavaScript" void choiceInstitution(theForm) { if(theForm.addInstitution[0].checked) { document.theForm.getElementByID("Institution").vis ibility = "visible"'; } } /script You don't have any elements with an id of "Institution" I assume you mean your HIDDEN input element which has a /name/ of "Institution". Give that an id of "Institution" and you're golden |
#4
| |||
| |||
|
|
Thanks for the help. I have a follow-up question. I know how to set styles for a whole page, whether in the page or (better) in an external style sheet. I don't want to override the style of all INPUT elements, but I can't seem to find any examples of modifying the style for one specific HTML element on a page, and nothing else of that same type. How can I do that? Thanks. |
#5
| |||
| |||
|
|
On Jun 11, 2:26 pm, Dan Rumney <danrum... (AT) warpmail (DOT) net> wrote: OccasionalFlyer wrote: [snip] I would appreciate help knowing what I did wrong. Here is the pertinent code: TD WIDTH=100% ALIGN=LEFT INPUT TYPE="HIDDEN" NAME="Institution" VALUE="{Individuals.CS- Appl Academic.Institution}" SIZE=32 MAXLENGTH=5 /TD An Input element of the HIDDEN type will never be displayed. You need to change this to the TEXT type and set the style attribute to "visibility:hidden;" TD width="100%" Input type="radio" name="addInstitution" value="Yes" onClick="choiceInstitution(this.form)" Input type="radio" name="addInstitution" CHECKED value="No" onClick="choiceInstitution(this.form)" /TD script LANGUAGE="JavaScript" void choiceInstitution(theForm) { if(theForm.addInstitution[0].checked) { document.theForm.getElementByID("Institution").vis ibility = "visible"'; } } /script You don't have any elements with an id of "Institution" I assume you mean your HIDDEN input element which has a /name/ of "Institution". Give that an id of "Institution" and you're golden Thanks for the help. I have a follow-up question. I know how to set styles for a whole page, whether in the page or (better) in an external style sheet. I don't want to override the style of all INPUT elements, but I can't seem to find any examples of modifying the style for one specific HTML element on a page, and nothing else of that same type. How can I do that? Thanks. |
#6
| |||
| |||
|
|
I modified my JavaScript like this, but this still doesn't work: script LANGUAGE="JavaScript" void choiceInstitution(theForm) { if(theForm.getElementByID.("Institution").style.vi sibility=="hidden") { document.theForm.getElementByID("Institution").sty le.visibility = "visible"'; } } function init(){ document.forms[0].getElementByID("Institution").style.visibility = "hidden"; } window.onload=init; /script |
#7
| |||
| |||
|
|
OccasionalFlyer wrote: [snip] I modified my JavaScript like this, but this still doesn't work: script LANGUAGE="JavaScript" void choiceInstitution(theForm) { if(theForm.getElementByID.("Institution").style.vi sibility=="hidden") { document.theForm.getElementByID("Institution").sty le.visibility = "visible"'; } } function init(){ document.forms[0].getElementByID("Institution").style.visibility = "hidden"; } window.onload=init; /script What about your INPUT element... did you set it's ID correctly? |
#8
| |||
| |||
|
|
TD WIDTH=100% ALIGN=LEFT INPUT TYPE="TEXT" NAME="Institution" VALUE="{Individuals.CS- Appl Academic.Institution}" SIZE=32 MAXLENGTH=5 /TD |
#9
| |||
| |||
|
|
I modified my JavaScript like this, but this still doesn't work: script LANGUAGE="JavaScript" void choiceInstitution(theForm) { if(theForm.getElementByID.("Institution").style.vi sibility=="hidden") { document.theForm.getElementByID("Institution").sty le.visibility = "visible"'; } |
#10
| |||
| |||
|
|
I modified my JavaScript like this, but this still doesn't work: script LANGUAGE="JavaScript" |
|
void choiceInstitution(theForm) { |
![]() |
| Thread Tools | |
| Display Modes | |
| |