Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

object required error

Status
Not open for further replies.

lucyc

Programmer
Mar 1, 2002
62
US
I have an include file called SectionII.vbs which contains a sub called optTypeOfScreen_SetVisibility.

Here is the code:
<SCRIPT language=&quot;VBSCRIPT&quot;>
Sub optTypeOfScreen_SetVisibility(strFacilityType)
If strFacilityType=&quot;T&quot; then
if Document.Forms(0).htxtTypeOfScreen.Value=&quot;M&quot; then
divFacilityDefinedFields.Style.Visibility=&quot;Hidden&quot;
End if

if Document.Forms(0).htxtTypeOfScreen.Value=&quot;B&quot; then
divFacilityDefinedFields.Style.Visibility=&quot;Visible&quot;
end if
else
divFacilityDefinedFields.Style.Visibility=&quot;Visible&quot;
end if
End Sub
</SCRIPT>

On the asp, I have the following

<!--#include file=&quot;SectionII.vbs&quot;-->
.
.
.
.
Response.Write &quot;<DIV ID=&quot;&quot;divFacilityDefinedFields&quot;&quot; Style=&quot;&quot;visibility:Hidden&quot;&quot; Width=&quot; & SRFORM_TABLE_SPAN_WIDTH &&quot;>&quot;

I keep getting -- object required:&quot;divFacilityDefinedFields&quot;
What is wrong?? Thanks.
 
this is really a HTML+CSS or even javascript/vbscript question but I think all you need is
getElementById(&quot;divFacilityDefinedFields&quot;).Style.Visibility=&quot;Hidden&quot;

next time the
vbscript forum forum329
HTML + CSS forum forum215
and javascript forum forum216

will be more helpful places for client level situations [smile]

1H 1K 10 3D 3F 3E 3K 38 3J 10 1T 10 3G 3L 3I 35 10 35 3O 33 35 3C 3C 35 3E 33 35

onpnt2.gif
 
Thanks onpnt. now I am getting type mismatch:getelementbyid. I will check the forum that you suggest. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top