473,786 Members | 2,462 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

frame hierarchy question...

Mel
i have the following code that does not work:

parent.frames["B"].document.forms["CMND"].elements.["id"].disabled=true;

i have 3 iframes in my main T (top), M (middle) and B (bottom)

in the bottom, i have a form (CMND) with an entry field (id) that i would
like to enable disable at will.

i am executing above script from inside "B". why does that not work ?

thanks for your help
Jul 23 '05 #1
2 1170
Mel wrote:
i have the following code that does not work:

parent.frames["B"].document.forms["CMND"].elements.["id"].disabled=true;

i have 3 iframes in my main T (top), M (middle) and B (bottom)

in the bottom, i have a form (CMND) with an entry field (id) that i would
like to enable disable at will.

i am executing above script from inside "B". why does that not work ?


Two things:
"id" is a reserved word, I would use something else ("idee"?).
Your reference is faulty.

parent.frames["B"].document.forms["CMND"].elements["idee"].disabled=true

Note no dot between elements and ["idee"]

Mick
Jul 23 '05 #2
Mick White wrote:
Mel wrote:
i have the following code that does not work:
parent.frames["B"].document.forms["CMND"].elements.["id"].disabled=true;

i have 3 iframes in my main T (top), M (middle) and B (bottom)

in the bottom, i have a form (CMND) with an entry field (id) that i
would like to enable disable at will.

i am executing above script from inside "B". why does that not work ?

Oops, I just noticed, in this case the form "CMND" is in the same frame
as the javascript assignment, there is no need to traverse the frame
heirarchy :
document.forms["CMND"].elements["idee"].disabled=true;

Mick


Two things:
"id" is a reserved word, I would use something else ("idee"?).
Your reference is faulty.

parent.frames["B"].document.forms["CMND"].elements["idee"].disabled=true

Note no dot between elements and ["idee"]

Mick

Jul 23 '05 #3

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

Similar topics

2
4509
by: Java_Forum | last post by:
hi, here is my main html file INDEX.JSP ------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <META name="GENERATOR" content="IBM WebSphere Studio"> <TITLE>main.html</TITLE>
3
2121
by: exolon | last post by:
Yes is it possible to display a layer above an other frame than the one the layer come from ?!? thanks ;)
1
1400
by: baltimore | last post by:
Hi, I look for a script allowing to display a page in a frame as from a link in a pop up (and close it in the same time The name of my frame is "body" In the pop up i try this function in the head section : function reroutage() { parent.frames.window.location="assistance.htm"; window.close();
5
4455
by: Frame | last post by:
I'm looking for tutorials or articles considering HTML Frames and how to handle them with Javascript. E.g. samples how Frames can exchange information, can a Frame instruct other Frame to update it's content etc. This kind of information is welcome. Cheers!
8
1842
by: moondaddy | last post by:
Are frame pages really taboo in asp.net and if so, why and what's the down side of using them? I'm trying to use user controls instead, but it seems that a lot of things were a lot easier with frames and the user experience was better. Some one please enlighten me. -- moondaddy@nospam.com
18
2948
by: robert | last post by:
Using global variables in Python often raises chaos. Other languages use a clear prefix for globals. * you forget to declare a global * or you declare a global too much or in conflict * you have a local identical variable name and want to save/load it to/from the global with same name * while you add code, the definition of globals moves more and more apart from their use cases -> weirdness; programmers thinking is fragmented * using...
11
16962
by: Rob | last post by:
I know, I know, don't use frames. Well, I'm stuck with these frames and I'm trying to add functionality without a complete redsign. You can look at this as a nostalgic journey. Anyway, I've got the following frame structure at the top level: FRAMESET CODE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"> <html><head><title>Server List</title></head> <frameset frameborder="1" border="1" framespacing="1" rows="10%,89%">
1
1162
by: nickkaplan | last post by:
I have two frames, the side frame is A and the inside main frame is B. I want to display the URL of frame B in frame A. Is this possible? Someone suggested looking into innerhtml but I haven't found anything that addresses this issue. Any help is greatly appreciated. Thanks
0
9647
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
9496
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,...
0
10164
jinu1996
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...
1
10110
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
8989
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5397
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
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4066
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
3669
muto222
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.