473,606 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

40 New Member
Hi All
My" Frame .html " page is divided in to header and client frames and in my client frame i am loading "client.htm l" 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
it works fine

i don want to use the name, can any one help me please?
Jul 6 '08 #1
10 7258
1,654 Recognized Expert Top Contributor
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
Revathi Balakrishnan
40 New Member
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.l ength 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.htm l" 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
16,027 Recognized Expert Moderator MVP
Post your HTML frame code. Also, have a look at this link.
Jul 8 '08 #4
Revathi Balakrishnan
40 New Member
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
Revathi Balakrishnan
40 New Member
Hi all
In the below syntax,

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
Revathi Balakrishnan
40 New Member
Hi all
the below syntax,

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

but the below works

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
57 New Member
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
Revathi Balakrishnan
40 New Member
Thanks for the reply, I tried top.frames[0].location.href that also does not work
Jul 23 '08 #9
16,027 Recognized Expert Moderator MVP
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

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

Similar topics

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 like:
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"> </FRAMESET>
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
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 page has a huge flash movie on it that is sucking my bandwidth.) I have devised the solution below which works only in IE, but not if Firefox or Opera or Safari. I would really appreciate any help. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...
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: 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 I did ------------------------------------------------------------------ <a href='#' onclick='window.opener.location.href =""http://www.google.com"";'>Click here</a> ------------------------------------------------------------------
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 = top.frames.location.href; if (l.indexOf("teacher_hub") == -1) { setTimeout(checkUpperFrame, 100); } else {
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%" height="100%" frameborder="0" scrolling="no" /> <frame src="Default.aspx" id="RightFrame" name="RightFrame" width="80%" height="100%" frameborder="0" scrolling="no" /> </frameset>
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 blank. Can anyone spot undefined behavior in the documents below or should we blame Safari? Regards,
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
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: 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: 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,...
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: 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.

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.