473,387 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

top.frames[1].location.href not working: fetch frame name during runtime

Hi All
My" Frame .html " page is divided in to header and client frames and in my client frame i am loading "client.html" page, and this client .html is divided in to multiple frames,

when i click any on link in the client.html,it should load the url of the link in the client frame, ir respective of the frame in which the link resides in the client.html,

hence i used

top.frames[1].location.href=link_url;
this is not working

But if i use
top.frames["framename"]=link_url
it works fine

i don want to use the name, can any one help me please?
Jul 6 '08 #1
10 7222
hsriat
1,654 Expert 1GB
According to w3schools, it would return references of the named frame only. So if the second frame of your page doesn't have any name, it won't be returned with frames[1].
Jul 6 '08 #2
i have named my frame, as CLIENT eventhough if i use
top.frames[1].location.href=link_url; i am getting object expected error, and i checked window.frames.length before the line top.frames[1].location.href usig alert, and that retured 1, but i expected more than 2, since my

My" Frame .html " page is divided in to header and client frames and in my client frame i am loading "client.html" page, and this client .html is divided in to multiple frames,

i don understand what is happening, i am expecting your advice :)
Jul 8 '08 #3
acoder
16,027 Expert Mod 8TB
Post your HTML frame code. Also, have a look at this link.
Jul 8 '08 #4
Hi Guys, I'm back , sorry was pulled in to some other issue,

And this issue was yet unresolved.

top.frames[1].location.href=page_url; is still not working,

But i have found one thing, it works in IE(version 6), it is not working in fire fox only.

Can any one hep me.


i am not able to paste the entire code, due to some safty measures :(
Jul 22 '08 #5
Hi all
In the below syntax,
top.frames["framename"].location.href

i don want to hard code the frame name, Instead is there any way in which i can dynamically fetch the name of the frame in a html file using javascript?

Any of ur advise would be much helpful to me
Jul 22 '08 #6
Hi all
the below syntax,

top.frames[1].location.href not working is not working in fire fox

but the below works
top.frames["framename"].location.href


i don want to hard code the frame name, Instead is there any way with which i can dynamically fetch the name of the frame in a html file using javascript?

Any of ur advise would be much helpful to me
Jul 23 '08 #7
Brosert
57
top.frames[1].location.href not working is not working in fire fox
Have you tried
Expand|Select|Wrap|Line Numbers
  1. top.frames[0].location.href 
Jul 23 '08 #8
hi
Thanks for the reply, I tried top.frames[0].location.href that also does not work
Jul 23 '08 #9
acoder
16,027 Expert Mod 8TB
Just post some relevant code, e.g. how you've declared the frame tag, where and how you're calling the code.
Jul 29 '08 #10
acoder
16,027 Expert Mod 8TB
Merged threads. Please do not double post your questions.
Jul 29 '08 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Lars Vatland | last post by:
Hello, if i have frameset frame name=A frame name=B How can i target all links in A to B? Via a script in the frameset? (i can only code the frameset file, not the frames) Maybe something...
1
by: Justin | last post by:
Hi, I have a simple frameset defined: ---------------- index.html ---------------- <FRAMESET COLS = "225,*"> <FRAME NAME = "a" SRC = "one.html"> <FRAME NAME = "b" SRC = "one.html">...
3
by: saiho.yuen | last post by:
Hi, Is anyone know what is the difference between Location.href and Window.location.href Thanks you very much:) Saiho
6
by: baranabas | last post by:
I have looked, but I can't seem to find an explanation for the problem I am having. I have a page that show an image from another server. I want the image to refresh without refreshing my page. (My...
2
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"...
1
by: Leon | last post by:
From parent windows, I have created a popup windows that comprises two frames. When I have clicked a link button in one of the frames, I would like to redirect the parent windows to somewhere. So...
1
by: laredotornado | last post by:
Hi, I keep getting the error, "Error: uncaught exception. Permission denied to get property Location.href" when executing this function: function checkUpperFrame() { var l =...
4
by: ChrisC | last post by:
I have a nice simple page - navigation frame on the left, main panel on the right - <frameset cols = "20%, 80%"> <frame src="LeftPanel.aspx" id="leftFrame" name="leftFrame" width="20%"...
6
by: August Karlstrom | last post by:
Hi everyone, I have some problems loading a page into a frame from a different frame. In Firefox and Explorer the lower frame displays "Test..." but in some older version of Safari it is left...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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...
0
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,...

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.