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="frameName 1">
<frame src="frame2.htm " name="frameName 2">
</frameset>
</html>
=============== ======
Then within the page 'frame1', I try to have a function that fills page
'frame2'. The function is:
<script LANGUAGE="JAVAS CRIPT">
function ShowSeminars()
{
/*parent.framena me2.location.hr ef = "http://www.amazon.com" ;*/
parent.framenam e2.location.hre f = "frame3.htm ";
}
</script>
I have a button that calls the function.
But the function does not work. First I thought the reason was that it
links to outside websites, but the code doesn't even work when it links
to 'frame3.htm' (a local page).
I tried 'firefox's javascript console to tell me whats wrong, and it
says something like 'parent.framena me2' has no properties.
Thanks,
Marvin 2 2112
COHENMARVIN wrote: 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="frameName 1"> <frame src="frame2.htm " name="frameName 2"> </frameset> </html> =============== ====== Then within the page 'frame1', I try to have a function that fills page 'frame2'. The function is: <script LANGUAGE="JAVAS CRIPT"> function ShowSeminars() { /*parent.framena me2.location.hr ef = "http://www.amazon.com" ;*/ parent.framenam e2.location.hre f = "frame3.htm ";
} </script> I have a button that calls the function. But the function does not work.
Javascript is case-sensitive.
FrameName2 != framename2
Try
parent.frameNam e2.location.hre f = "frame3.htm ";
COHENMARVIN a écrit : Folks, I wrote a simple javascript script, but it doesn't work. First I have a web page that uses frames: =============== ======
You should add this doctype declaration:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head><title>Sh owing seminars</title>
<frameset rows="10%,90%"> <frame src="frame1.htm " name="frameName 1"> <frame src="frame2.htm " name="frameName 2"> </frameset> </html> =============== ====== Then within the page 'frame1', I try to have a function that fills page 'frame2'. The function is: <script LANGUAGE="JAVAS CRIPT">
<script type="text/javascript">
Language is deprecated while type is both backward and forward-compatible.
function ShowSeminars() { /*parent.framena me2.location.hr ef = "http://www.amazon.com" ;*/ parent.framenam e2.location.hre f = "frame3.htm ";
parent.frames["frameName2 "].location.href = "frame3.htm "; } </script>
</head>
I have a button that calls the function. But the function does not work. First I thought the reason was that it links to outside websites, but the code doesn't even work when it links to 'frame3.htm' (a local page).
I tried 'firefox's javascript console to tell me whats wrong, and it says something like 'parent.framena me2' has no properties.
That means firefox does not "see" "parent.framena me2" as edited. The
name is frameName2, not framename2.
Gérard
--
remove blah to email me This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ravi |
last post by:
I have a webpage(with a text field and a button) which prompts for a
local file and attempts to load the file in the window if the user
clicks on the button. The javascript code onClick event uses the
location.href property to achieve the desired result. (This loaded
page has some additional functionality which lets them upload the
contents to the server.)
This approach only seem to work for some computers and on others it is
loading a...
|
by: Max of Mad |
last post by:
Hi all,
I wrote this a while back, but I was unable to get it to work for
mozilla. Looked all over the place, but could not find anything on why.
Basically, this has a dropdown of some search engines, and a text input
for the search term. Click GO and it takes you to the selected search
engine with the query.
This works great on IE and Opera, but it will not work in Mozilla. My
|
by: Phil Powell |
last post by:
if (document.location.href.indexOf('?') >= 0) document.location.href
= document.location.href.substring(0,
document.location.href.indexOf('?'));
if (document.location.href.indexOf('#') >= 0) {
document.location.href = document.location.href.substring(0,
document.location.href.indexOf('#')) + '?' + newUrl;
} else {
document.location.href = document.location.href + '?' + newUrl;
}
|
by: JF |
last post by:
Hi,
I need to change the location of the parent window and after
that scroll a little bit (because of "position:fixed" css buttons,
which obscure the title).
I have
window.opener.location.href = "newhreflabel";
window.opener.scrollBy(0, -25);
|
by: Jerry Manner |
last post by:
Hi
I have a problem using the location.href("ProductL.htm") javascript
code. Using this code on my system ( W98 SE, IE 6.0) is working
correctly.
But if a user has W2000 IE 5.0 it doesn't work. When using this code
the browser shows an error on page in the statusbar. If I click on the
statusbar to find out what is causing the error I see this description
'The property of this method is not supported by this object' ( I have
translated...
| |
by: JHB |
last post by:
Hi,
How can I do a location.replace when I use a form, like when I use a href?
This works.
<a href="Ny HTML-side20.htm"; method="post" id="frm" name="BrugerHovedSide"
onsubmit="location.replace(this.href);" >
<input class="ok" type="submit" value="Opfrisk data" id=submit1
name=submit1>
</a>
|
by: Simula |
last post by:
I am developing an HTML javascript application and I want to preserve
state in a way that can be book-marked. I chose HTML anchors as a means
of preserving state. When the application changes state, the HTML page
URL would change from default.html to default.html#stateA.
example: http://pearstudios.com/javascript/locationHashAndFlash.html
This has worked perfectly within HTML and javascript alone, however,
when connecting Flash and...
|
by: Tazy |
last post by:
does anyone know the work around using location.href with firefox. it
doesn't work with firefox but fine with ie.
please help,
doug
|
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: 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: 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...
|
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: 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...
| |