473,657 Members | 2,489 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Firefox access to frames and forms in Javascript

I was having an issue at www.logolounge.com where the form in the
bottom frame was no longer accessible through javascript in FireFox
1.5.0.8. I found the solution and wanted to share it. The previous
code, which no longer works in FireFox, to access the bottom frames
form is as follows:

function addBox(a) {
URL = "to_box.asp ?a=" + a+ "&b=" +
top.bottomFrame .frmBoxNames.se lID.options[top.bottomFrame .frmBoxNames.a. selectedIndex].value;
top.bottomFrame .location.href = URL
}

and the new, fully funcitoning in both IE and FireFox code is:

function addToLightbox(a ) {
URL = "to_box.asp ?a=" + a+ "&b=" +

top.frames[1].document.forms[0].selID.options[top.frames[1].document.forms[0].a.selectedInde x].value;
top.bottomFrame .location.href = URL
}

As you can see, I had to access the frames and forms arrays in order to
get it to work. The named frame (bottomFrame) properties are no longer
availalbe to me in FireFox.

Troy

Nov 20 '06 #1
1 6744
ASM
tr*******@gmail .com a écrit :
I was having an issue at www.logolounge.com where the form in the
bottom frame was no longer accessible through javascript in FireFox
1.5.0.8. I found the solution and wanted to share it. The previous
code, which no longer works in FireFox, to access the bottom frames
form is as follows:

function addBox(a) {
URL = "to_box.asp ?a=" + a+ "&b=" +
top.bottomFrame .frmBoxNames.se lID.options[top.bottomFrame .frmBoxNames.a. selectedIndex].value;
top.bottomFrame .location.href = URL
parent.bottomFr ame.document. ...

you have forgotten "document" !
}

and the new, fully funcitoning in both IE and FireFox code is:

function addToLightbox(a ) {
URL = "to_box.asp ?a=" + a+ "&b=" +

top.frames[1].document.forms[0].selID.options[top.frames[1].document.forms[0].a.selectedInde x].value;
top.bottomFrame .location.href = URL
}

As you can see, I had to access the frames and forms arrays in order to
get it to work. The named frame (bottomFrame) properties are no longer
availalbe to me in FireFox.
Not at all : this time you address to the document of your frame !
>
Troy
Tried this which works fine (FF2) :

function look() {
var target = parent.middle.d ocument.myForm. mySelect;
var k = target.selected Index;
var p = document.create Element('P');
p.innerHTML = target.options[k].text;
var place = parent.bottom.d ocument.body;
place.appendChi ld(p);
}

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Nov 21 '06 #2

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

Similar topics

3
1727
by: Geoff Cox | last post by:
Hello, I have a web site with 3 frames, top, left and right. I am wondersing if it is possible to have a button in the top frame page which when clicked opens one page in the left frame and a different page in the right frame? At the moment I have this working using Javascript but oen user is getting runtime error message when clicking the button ...
0
1310
by: Ashish_khanna | last post by:
I have an MDI form. from here i am opening my child forms by creating objects. Plz tell me how to make single instance of these forms. and how to access ActiveMDI forms public methods
7
1973
by: Trvl Orm | last post by:
I am working with 2 frames, Left and Right and the main code is in the left frame, which has been attached. Can someone please help me with this code. I am new to JavaScript and can't figure it out. What needs to happen is this: On the left frame you should have a series of buttons, which when pushed makes things happen on the right frame.
5
6740
by: William Krick | last post by:
I did a little searching for javascript code that will make a page "jump out" of frames when the page is loaded. There seems to be many, many ways to do this and I've added the ones I found to the end of this post. Which one should I use? Is there a generally accepted "best" way to do this that works will all browsers? .... Krick
2
1417
by: gthompson | last post by:
I'm redesigning my Access Form in Visual Studio (asp.net) so that I can have a Web application connected to the Access Database. It is a user form. Is there any way to have a subform in Visual Studio? I'm trying to keep from making too many changes, since the users have been using this form (wireless) and we now want to be Web based. Is there a better way to make my Access Database (forms, tables, etc...) web based - without redesigning...
4
5690
by: Thelonious Monk | last post by:
Is it possible to convert Microsoft Access 2000 forms and import them into a Visual Basic .NET project? This may be a far-fetched question, but it sure would be nice to do. Thanks!
2
10153
by: walt | last post by:
Just converted from Office 2000 to Office 2007, after ran into to a few problems (lack of understand being the bigs problem) but the one I can't overcome is, in access 2000 forms I could display pictures, after the conversion my original pictures show in the converted form but no new pictures display. I tried " insert object " using jpg and bmp file and all I get is the name of the file in the placeholder. Thanks for any help Walt
3
2399
by: mportman300 | last post by:
Have pity on me.. i have been doing html, css, javascript squarely over 2 years... and am now doing a family project.. in my project i have decided to use a context menu script, its a menu that pretty much allows for when you right click on a page it shows you different links that the standard right click menu, link here: http://www.dynamicdrive.com/dynamici...ontextmenu.htm What it does exactly is opens a new window with the link that you...
1
2211
by: mre | last post by:
Hi How can i find the relative path of my access database from javascript to use it in my connection string? the database and html file are in the same directory. var strConn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source =" + AddressOfFile + "\\dbname.mdb;" I need AddressOfFile thanks
0
8392
marktang
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...
0
8823
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...
1
8503
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
8603
tracyyun
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...
0
5632
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();...
0
4151
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
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
2
1604
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.