469,934 Members | 2,706 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,934 developers. It's quick & easy.

RegisterStartupScript doesn't work in a aspx page containing a frameset

I have an aspx page which contains a frameset.

I want to set the location.href of the frames dynamically using javascript
created in the Page_Load of the frameset using RegisterStartupScript, but
the registered script doesn't appear to run. Is there some reason why
RegisterStartupScript won't work in a aspx page containing a frameset?
Aug 28 '07 #1
6 4212
I have an aspx page which contains a frameset.
>
I want to set the location.href of the frames dynamically using
javascript created in the Page_Load of the frameset using
RegisterStartupScript, but the registered script doesn't appear to
run. Is there some reason why RegisterStartupScript won't work in a
aspx page containing a frameset?
When you view the html source of that frameset page as it was
received by the browser, do you see the javascript there?

Just a wild guess: will javascript work in a frameset page? (I expect
it does, but you never know ...)

Hans Kesting
Aug 29 '07 #2
"Hans Kesting" <ne***********@spamgourmet.comwrote in message
news:c0**************************@news.microsoft.c om...
Just a wild guess: will javascript work in a frameset page?
Yes.
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 29 '07 #3
Thank you for the response.

I know that javascript works in a frameset page.

The problem is that when I attempt to insert javascript using
RegisterStartupScript in a frameset page the javascript is not created.

-Bill
"Hans Kesting" <ne***********@spamgourmet.comwrote in message
news:c0**************************@news.microsoft.c om...
>I have an aspx page which contains a frameset.

I want to set the location.href of the frames dynamically using
javascript created in the Page_Load of the frameset using
RegisterStartupScript, but the registered script doesn't appear to
run. Is there some reason why RegisterStartupScript won't work in a
aspx page containing a frameset?

When you view the html source of that frameset page as it was received by
the browser, do you see the javascript there?

Just a wild guess: will javascript work in a frameset page? (I expect
it does, but you never know ...)

Hans Kesting


Aug 29 '07 #4
"BillE" <be****@datamti.comwrote in message
news:uh**************@TK2MSFTNGP06.phx.gbl...
The problem is that when I attempt to insert javascript using
RegisterStartupScript in a frameset page the javascript is not created.
Please show your code.
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 29 '07 #5
"Joey" <jo*********@topscene.comwrote in message
news:11*********************@r29g2000hsg.googlegro ups.com...
I would also set the XHTML doctype to frameset, instead of
transitional. I believe you are supposed to do that when using frames.
Yes, that's correct.

Also, script language=javascript is deprecated syntax and not
XHTML-compliant - is this instead:

<script type="text/javascript">

or, even better, get ASP.NET to inject the script tags automatically:
http://msdn2.microsoft.com/en-us/lib...8y(VS.80).aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 29 '07 #6
I'll do that.

Apparently, however, RegisterStartupScript won't work in frameset pages
because there is no <formtag, according to the post from "marss".

Thanks!
Bill

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:uM**************@TK2MSFTNGP02.phx.gbl...
"Joey" <jo*********@topscene.comwrote in message
news:11*********************@r29g2000hsg.googlegro ups.com...
>I would also set the XHTML doctype to frameset, instead of
transitional. I believe you are supposed to do that when using frames.

Yes, that's correct.

Also, script language=javascript is deprecated syntax and not
XHTML-compliant - is this instead:

<script type="text/javascript">

or, even better, get ASP.NET to inject the script tags automatically:
http://msdn2.microsoft.com/en-us/lib...8y(VS.80).aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 29 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by COHENMARVIN | last post: by
11 posts views Thread by Fred | last post: by
3 posts views Thread by Lukman | last post: by
6 posts views Thread by Bill Jones | last post: by
11 posts views Thread by Stan Sainte-Rose | last post: by
2 posts views Thread by Guadala Harry | last post: by
1 post views Thread by Jaime Stuardo | last post: by
17 posts views Thread by Rob R. Ainscough | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.