Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > registering javascript

Reply
Thread Tools

registering javascript

 
 
Timothy Elvidge
Guest
Posts: n/a
 
      07-15-2004
I have a menu control that is embedded in each web page. The menu requires javascript for the mouseover events. I have tried Page.RegisterClientScriptBlock and
Page.RegisterStartupScript to no avail. The script doesn't appear on the parent page?? What to do?
 
Reply With Quote
 
 
 
 
XicoLoKo
Guest
Posts: n/a
 
      07-15-2004
When do you call the Page.RegisterClientScriptBlock?
What key are you using to uniquely identify each script?

"Timothy Elvidge" wrote:

> I have a menu control that is embedded in each web page. The menu requires javascript for the mouseover events. I have tried Page.RegisterClientScriptBlock and
> Page.RegisterStartupScript to no avail. The script doesn't appear on the parent page?? What to do?

 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      07-15-2004
To add to this that registering needs to happen in OnPreRender at the
latest. In Render it is too late because render process has begun for the
Page already.


--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke



"XicoLoKo" <> wrote in message
news:3CF5D395-EBD4-4458-AE22-...
> When do you call the Page.RegisterClientScriptBlock?
> What key are you using to uniquely identify each script?
>
> "Timothy Elvidge" wrote:
>
> > I have a menu control that is embedded in each web page. The menu

requires javascript for the mouseover events. I have tried
Page.RegisterClientScriptBlock and
> > Page.RegisterStartupScript to no avail. The script doesn't appear on the

parent page?? What to do?


 
Reply With Quote
 
Mr. Dot Net
Guest
Posts: n/a
 
      07-15-2004
Is it possible that you use output cache for that control?

"Timothy Elvidge" <> wrote in
message news:52C1C0F9-BA89-44F6-8E8A-...
> I have a menu control that is embedded in each web page. The menu requires

javascript for the mouseover events. I have tried
Page.RegisterClientScriptBlock and
> Page.RegisterStartupScript to no avail. The script doesn't appear on the

parent page?? What to do?


 
Reply With Quote
 
Timothy Elvidge
Guest
Posts: n/a
 
      07-16-2004
I have moved the following to the parent page for the menu control and I still can't see the Javascript appearing. This is what I am doing:-
protected override void OnPreRender (System.EventArgs e)
{
Page.RegisterClientScriptBlock ("menuscript", "<script language=\"javascript\" src=\"default.js\"></script>\n");
}
I can use the ControlAt and write the script block as a literal control but would like to do this the right way.


"Teemu Keiski" wrote:

> To add to this that registering needs to happen in OnPreRender at the
> latest. In Render it is too late because render process has begun for the
> Page already.
>
>
> --
> Teemu Keiski
> MCP, Microsoft MVP (ASP.NET), AspInsiders member
> ASP.NET Forum Moderator, AspAlliance Columnist
> http://blogs.aspadvice.com/joteke
>
>
>
> "XicoLoKo" <> wrote in message
> news:3CF5D395-EBD4-4458-AE22-...
> > When do you call the Page.RegisterClientScriptBlock?
> > What key are you using to uniquely identify each script?
> >
> > "Timothy Elvidge" wrote:
> >
> > > I have a menu control that is embedded in each web page. The menu

> requires javascript for the mouseover events. I have tried
> Page.RegisterClientScriptBlock and
> > > Page.RegisterStartupScript to no avail. The script doesn't appear on the

> parent page?? What to do?
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: registering/re-registering ASP.NET 1.1.4322 with IIS Juan T. Llibre ASP .Net 2 12-16-2006 12:29 AM
Registering javascript via the Page object, why? =?Utf-8?B?Q2hhcmxlc0E=?= ASP .Net 3 05-15-2006 02:18 PM
Initial problems registering RObErT_RaTh The Lounge 5 08-26-2005 05:53 AM
Registering javascript Timothy Elvidge ASP .Net Web Controls 0 07-15-2004 05:53 AM
Problem with registering VB DLLs. Please help urgently.... Kelly G. ASP .Net 1 01-09-2004 01:58 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57