Hi,
I am new to javascript.
This is my problem description.
Actually I have 3 pages.
In the first page I have 2 frames.
In the first page(first) from one of the frame(first), I have a link to another page(second).
From the second, I have opened new page(third).
these and all i did in html.
But the problem is from the third page , I have to dispaly some contents to the
second frame of the first page using the javascript function and on_click event.
The code as follows:
The Code for first page:
[HTML]<html>
<head>
</head>
<frameset rows="50%,50%">
<frame src="D:\frame_b.html" name="first">
<frame src="D:\frame_c.html" name="second">
</frameset>
</html>
The code for second page:
<html>
<head>
</head>
<body>
this is frame_b
<a href="D:\link.html"target="_blank">click here</a>
</body>
</html>
Code for third page:
<html>
<head>
</head>
<body>
this is the new page open in new window
<a href="D:\sample.html"target="_blank">click here</a>
</body>
</html>
Code for fourth page:
<html>
<head>
</head>
<body>
this is sample html page
<script>
function testing()
{
window.parent.second.location="D:\frame_c.html"
}
</script>
<a href="#" onClick="javascript:testing();return false">Say Hi</a>
</body>
</html>
The code for the text display in secod frame:
<html>
<head>
</head>
<body>
this is frame_c
</body>
</html>[/HTML]
Where I am doing mistake ? please help me
8 4605
try this .............. -
window.parent.second.location.href="D:\frame_c.html"
-
Debasis Jana
try this .............. -
window.parent.second.location.href="D:\frame_c.html"
-
Debasis Jana
Hi Debasis,
Thank you.
But I got the error in my last probgram
Error :
I got the error in line 9 and in character 15.
window.parent.second.location is null or not an object.
please help me....
Thanks and regards,
Susi
Hi Debasis,
Thank you.
But I got the error in my last probgram
Error :
I got the error in line 9 and in character 15.
window.parent.second.location is null or not an object.
please help me....
Thanks and regards,
Susi
What is second?
I think it is a frame....named second.
then try it .......... -
window.parent.frames["second"].location.href = "...";
-
Debasis Jana
What is second?
I think it is a frame....named second.
then try it .......... -
window.parent.frames["second"].location.href = "...";
-
Debasis Jana
Hi Debasis,
Ya its one of the frame in the first page.
Thank you,
Susi
Hi Debasis,
Ya its one of the frame in the first page.
Thank you,
Susi
Now what is happening??
The frame is first, second or what?
Debasis Jana.
Now what is happening??
The frame is first, second or what?
Debasis Jana.
Hi Debasis,
Its second frame.But now also I am getting the same error.
If the parent means , is it identify the direct page only or the first page?
Thanks and Regards,
Susi
Hi,
I tried the following in the last file.Its working fine.But throws javascript error.
[HTML]<html>
<head>
</head>
<body>
this is sample html page
<a href="D:\frame_c.html" target="second" onClick="parent.frames[second].location.href="D:\frame_c.html" return false;">Say Hi</a>
</body>
</html>[/HTML]
Thanks and Regards,
Susintha
gits 5,390
Expert Mod 4TB
since 'second' is a value of an attribute its a string ... so use: - parent.frames['second'].location.href='D:\\frame_c.html';
kind regards
ps: note ... you cannot use the double quotes inside the onclick statement, simply use single quotes or escape the double ones
Sign in to post your reply or Sign up for a free account.
Similar topics
by: BGMeshi |
last post by:
Hi,
The following javascript code (serving a main HTML page) dynamically
creates
IFRAME to contain other HTML page. Everyting works OK, however when I
am trying
to access the main HTML page...
|
by: |
last post by:
In IE, from the child window of a frameset i use the function
top.window.close()
And this works in IE, but not in nn4!
How can i make this same effect in nn4?
please help
|
by: CyberBless |
last post by:
I have a page that opens a child window using window.open(...). How do
I make so that when that child window opens you cannot get the focus
back on the parent window unless you close the child...
|
by: Nathan Burleson |
last post by:
Hello,
I have a custom control that is used to select a location from a list
of locations. When put on the page it creates an asp:textbox (used to
display the name of the location), a hidden...
|
by: Earl Teigrob |
last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
|
by: gsuns82 |
last post by:
hi all,
I got to reload parent window from its child window,i used the folloeing code
opener.location.reload();
self.close(); in child window.
Parent window gets...
|
by: newsteve1 |
last post by:
hello,
i have a parent page with a bunch of photos. clicking on the first photo will lead to a new child window with a close-up of that photo AND from there you can cycle through all of the other...
|
by: varunvashishth |
last post by:
hi,
I'm facing a problem with displaying a child jsp on top of parent jsp.
on clicking a link in parent jsp the child jsp opens up and it has some list of values and other textboxes which gets...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
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,...
|
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...
| |