Re: Master pages with a onload command.
- From: "Random" <cipherlad@xxxxxxxxxxx>
- Date: Tue, 14 Aug 2007 09:36:41 -0700
Take a look at the RegisterStartupScript method. Use that or declaratively
add your javascript call to the onload event with "window.onload = {name of
function, no parentheses}" Then it doesn't matter where your <body> tag is.
"Mufasa" <jb@xxxxxxxxxxx> wrote in message
news:%23eJv6um3HHA.4672@xxxxxxxxxxxxxxxxxxxxxxx
I have a master page with stuff in it. It includes the body tag and then
the asp:content tag. I want to hide some text when the page is loaded but
is made visible by a check box. All that code works fine. I have the text
in a <div> that I hide/unhide when a checkbox is clicked and it's all done
at the client level.
Problem is, to hide the text I need to call a javascript function on load.
The only place it seems to work is in the <body> command. But if I do
that, I get a warning about having a <body> command within a <div> command
(the div is part of my master page.)
Anyway around this? I would like to leave the stuff at the client side so
it responds immediately without a postback to the server.
TIA - Jeff.
.
- References:
- Master pages with a onload command.
- From: Mufasa
- Master pages with a onload command.
- Prev by Date: Re: Problem getting ActiveViewIndex
- Next by Date: Re: Master pages with a onload command.
- Previous by thread: Master pages with a onload command.
- Next by thread: Re: Master pages with a onload command.
- Index(es):
Relevant Pages
|