473,616 Members | 2,800 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JS in HTML Frameset

I have a website with code like the following. I swear it used to work
2 years ago when first written. However, testing in both IE6SP2 and
Firefox 1.5 no longer seem to run the script at the top level of the
frameet.

Is there a way to run JS at the frameset level? (I want to us JS to
parse some querystrings passed to the frameset, and use those to pass
on to one child frame and change the href of the other child frame.)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1">
<title>Testin g</title>
</head>
<frameset cols="220,*">
<frame src="t1.html" name="f1" id="f1">
<frame src="t2.html" name="f2" id="f2">
</frameset>
<script type="text/javascript">
alert( 'Yay!' );
</script>
</html>

Oct 16 '06 #1
1 1702
Phrogz wrote:
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1">
<title>Testin g</title>
</head>
<frameset cols="220,*">
<frame src="t1.html" name="f1" id="f1">
<frame src="t2.html" name="f2" id="f2">
</frameset>
<script type="text/javascript">
alert( 'Yay!' );
</script>
</html>
Nevermind, I validated my HTML (which I should have done before) and
see that script isn't legal there. I've changed it to:
<html><head>
....
<script type="text/javascript">
window.onload=f unction(){
....
}
</script></head><frameset>
....
</frameset></html>

And all is working as intended. Sorry for the noise.

Oct 16 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2111
by: Jan Plastenjak | last post by:
This question is about html. I have this: <frameset rows="90%,10%" frameborder="NO" border="0" framespacing="0" cols="1"> <frame name="topFrame" noresize src="c:\bpp.xml"> <frame name="bottom" scrolling="NO" noresize src="c:\btn.htm"> </frameset> Is there a way to assign html code to frames "in code", not to have to specify src property? Something like:
6
2259
by: Vanitha | last post by:
Hi All, I am developing a Web based application for an embedded target, using BOA webserver. I need to return some values to the HTML client. I am using CGI-C to extract the values sent by the client from the server. I dont want to generate the entire HTML page each time from the server.'cos i need to refresh the status less than a second..
11
1957
by: Brett | last post by:
In Yahoo mail, I click the Inbox link and see my messages. If I view source, I don't have HTML which contains the URL of each message. The source HTML contains javascripting and framesets. This is different from what I am seeing. If I right click on a message link and select "copy shortcut", I can paste this link into my browser. This brings me to my message. If I view source, once again, it is javascript and framesets. How do I...
25
43407
by: Steal | last post by:
Hi at all I try to validate this page using the link: http://validator.w3.org/ but it return that this is not a valid HTML 4.01 page please where is it error? Steil <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head>
14
6511
by: Alex Molochnikov | last post by:
Is there any way to embed the HTML code inside FRAMESET? Something like this: <frameset cols="50%,*"> <frame src=" ... HTML code for the frame ... "> <frame src="Frame2.html" name="main"> </frameset><noframes></noframes> I tried using a Javascript function that returns the HTML text, as in the following code:
13
2712
by: Arie Mijnlieff | last post by:
Hi ! I have an html file (http://www.kpc.nl/home.html) which i send to the w3 validator as well as to a an online HTML tidy script. The w3 validator (validator.w3.org) claims the frameset tag doesnt have a border tag whereas the html tidy script (http://infohound.net/tidy/tidy.pl) claims everything is ok.. Who is right ? I am asking this because i would like to write clean
3
1562
by: Jofio | last post by:
In my frame based page, I have a hyperlink in the top frame called "header" which, when I click, should make two different pages to be loaded and displayed into two different frames, namely "thumbnails" frame and "main" frame simultaneously. My framed page is defined as follows: <frameset rows="15%,*,15%"> <frame src="headerWelcome.html" name="header" /> frameset cols="20%,*,20%">
2
2483
by: Mark Kamoski | last post by:
Hi-- I need a code sample of how to redirect from an ASP.NET page to a frames-based html page and specifying what should load in the destination's frames. Any ideas? (Even air-code is much appreciated.)
6
1645
by: Ashok | last post by:
Hi, I am starting a new project to build a software product using APS.NET 2.0. In past I have used "frameset" and "frame" to build pages. My current requirements I have coded using frameset and frame like code below. My question is, because this is a new development is it good to use frameset and frame or I can use some thing better. I am looking for expert suggestions on my code below is this a good way to move or I should not use...
0
8145
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,...
0
8642
Oralloy
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...
0
8592
jinu1996
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...
1
8294
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7118
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4060
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4140
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2576
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
0
1439
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.