Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
JavaScript problem
Message
 
À
10/03/2008 17:09:51
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
OS:
Windows XP
Divers
Thread ID:
01300544
Message ID:
01300740
Vues:
17
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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform