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 RegisterStartup Script, but
the registered script doesn't appear to run. Is there some reason why
RegisterStartup Script won't work in a aspx page containing a frameset? 6 4351
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
RegisterStartup Script, but the registered script doesn't appear to
run. Is there some reason why RegisterStartup Script 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
"Hans Kesting" <ne***********@ spamgourmet.com wrote in message
news:c0******** *************** ***@news.micros oft.com...
Just a wild guess: will javascript work in a frameset page?
Yes.
--
Mark Rae
ASP.NET MVP http://www.markrae.net
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
RegisterStartup Script in a frameset page the javascript is not created.
-Bill
"Hans Kesting" <ne***********@ spamgourmet.com wrote in message
news:c0******** *************** ***@news.micros oft.com...
>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 RegisterStartu pScript, but the registered script doesn't appear to run. Is there some reason why RegisterStartup Script 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
"BillE" <be****@datamti .comwrote in message
news:uh******** ******@TK2MSFTN GP06.phx.gbl...
The problem is that when I attempt to insert javascript using
RegisterStartup Script in a frameset page the javascript is not created.
Please show your code.
--
Mark Rae
ASP.NET MVP http://www.markrae.net
"Joey" <jo*********@to pscene.comwrote in message
news:11******** *************@r 29g2000hsg.goog legroups.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=javasc ript 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
I'll do that.
Apparently, however, RegisterStartup Script won't work in frameset pages
because there is no <formtag, according to the post from "marss".
Thanks!
Bill
"Mark Rae [MVP]" <ma**@markNOSPA Mrae.netwrote in message
news:uM******** ******@TK2MSFTN GP02.phx.gbl...
"Joey" <jo*********@to pscene.comwrote in message
news:11******** *************@r 29g2000hsg.goog legroups.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=javasc ript 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: COHENMARVIN |
last post by:
Folks,
I wrote a simple javascript script, but it doesn't work.
First I have a web page that uses frames:
=====================
<html>
<frameset rows="10%,90%">
<frame src="frame1.htm" name="frameName1">
<frame src="frame2.htm" name="frameName2">
</frameset>
</html>
|
by: Fred |
last post by:
I have an aspx page: Main.aspx which has several components that cause
a postback. In the page Main.aspx I also have an iframe which contains
a multi-page pdf file.
The problem I am facing is that whenever the user does an action which
causes a postback on the main page Main.aspx, the page posts back and
the pdf file in the iframe is reloaded. This is a problem becuase if
the user has rotated or magnified the page then that is lost.
...
|
by: Lukman |
last post by:
Hi,
Could you tell me about what is RegisterStartupScript, I try to understand
from MSDN sample, but I still don't understand. Could you give me more
simple sample ? and what is the purpose of RegisterStartupScript.
Thanks,
|
by: Bill Jones |
last post by:
I'm trying to use this.RegisterStartupScript to add some javascript to and
aspx page that will run when the page is loaded. Does anyone know if this
function only works in the Page_Load function? Or can I put it anywhere.
Right now it is inside the eventhandler function that is called on the
"CheckChanged" event of a checkbox, but it never seems to add the javascript
code to the page. Is there another way to do this? Let me explain the...
|
by: Stan Sainte-Rose |
last post by:
Hi,
I m working on a user control.
I need to use a Js file, I would like to know how to load the js file using
RegisterStartupScript command from the user control.
Also, if I load the same user controls several times in the same webpage, do
I have to check if the js file is still loaded ?
Stan
| |
by: Guadala Harry |
last post by:
I have a frameset aspx page that enables users to upload photos. One
frame/page shows a thumbnail list of prevously-uploaded images, and the
other frame/page includes the controls that enable selecting and uploading
additional photos. After uploading a file, the list of thumbnail images
needs to get refreshed to show the newly uploaded picture. This is
accomplished by using the following code:
string scriptString = "<script...
|
by: Jaime Stuardo |
last post by:
Hi all...
I have an ASPX page that is part of a frameset whose Page_Load method
contains this simple code:
RegisterStartupScript("test", "<script>alert('hola');</script>")
When I debug, I can realize that script is registered (by using
IsStartupScriptRegistered method) but it isn't sent to the browser.
|
by: Rob R. Ainscough |
last post by:
Again another simple concept that appears NOT to be intuitive or I'm just
stupid. I've read the WROX book and the example doesn't actually show how
the .master page links in the other content pages? Kinda sorta a critical
point no?
Am I missing something?
Rob.
P.S. the day I find a book that actually is useful rather than just a
|
by: MJP |
last post by:
I have a button which kicks off the generation of a report after which
the file will be downloaded. The report generation can take a long
time, so client side onclick event of the button also makes a <span>
tag visible which contains a nice message to the user thanking them
for their patience. Of course after the report has been generated and
downloaded this message should be removed. However, the
RegisterStartupScript isn't working...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |