Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
JavaScript problem
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
OS:
Windows XP
Miscellaneous
Thread ID:
01300544
Message ID:
01300740
Views:
18
Script like this is usually placed in 'startup code' which is a script block just before the form tag.

That works in most cases or alternately you need a real startup handler like hooking < body onload="" > or using a javascript library like jQuery to reliably tell when the document's properly loaded.

Overkill in your situation - you can just use the startup script block on the bottom of the page and that will work fine.

+++ Rick ---

>>it should be:
>>
>>
>>document.getElementById("tblProInfo").style.display="none";
>>
>>
>>Note the .style...
>>
>>It's also bad practice to directly reference controls like this. You should always check existance separately first...
>>
>>+++ Rick ---
>>
>>
>I was not sure where to put the script. This page doesn't have Head tag, since it's within the master page. I'm so confused with it and very frustrated, because simple things don't work :(
>
>Do you know where in the text of ASPX page I can create a JavaScript function?
>
>Or should I use RegisterScript ?
>
>Thanks in advance for your help.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform