473,831 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to access the parent element?

31 New Member
Hello, I am working in javascript and I need to access the parent element. I have 4 different html documents in the same folder.
The names are title, code, golf,tree. I am currently in the title document and I want to access a frame in the code document. I am new to programming in javascript and I know this is simple. Can someone please point me in the right direction.
Nov 9 '08
22 5304
gits
5,390 Recognized Expert Moderator Expert
I am curious. I was wondering if the statement

windows.frames is equivalent to parent.frames.
i guess you mean:

Expand|Select|Wrap|Line Numbers
  1. window.frames
? this is not equivalent except you are in the top window. otherwise it gives you the frames-collection for the current window and 'every frame is its own window' or in other words has its own window-context

kind regards
Nov 9 '08 #11
waltapp
31 New Member
So if I want to access the frameset rows from the current setting to "100.1.*" . The correct command would be:

parent.frameset .rows=("100.1.* ")

The demo being the parent thereby replacing the word parent. Frameset being the child of the parent and so forth.
Nov 9 '08 #12
waltapp
31 New Member
Yes, I was thinking that after I posted it. I often times think much better after I verbalize or in this case write something.
Nov 9 '08 #13
gits
5,390 Recognized Expert Moderator Expert
and in case you want a good book then have a look at this one because i personally think that this 'New Perspectives ...' book is one of the worst i ever saw - and even the reviews don't fail in this regard ... i know that you probably have to! use it ... but i think the above shown book is much!!! better ... may be you could have a look at it in a library? when you feel comfortable with it then i would recommend to buy it since there is no more complete JavaScript book out there ... just some that handle more specific topics a bit better :)

kind regards
Nov 9 '08 #14
waltapp
31 New Member
I have to agree. This book seems to be the product of a muddled mind. I was going to say so earlier but being a student it is hard to have a full grasp. I find programming very easy because it is logical and it either works or it doesn't. You have to be very organized in your approach. This book is anything but organized. The information is not properly centalized or indexed. The projects are like fill in the blanks but you never really get a proper question and have to guess at a lot of things. It has been a real time waster for what should be an easy and fun course.
Nov 9 '08 #15
waltapp
31 New Member
I will give this book a try. Thank you for the recommendation. I have been resorting to the internet for most of my help. I have been reluctant to purchase another resource without a proper recommendation as my money is very limited. I am working part time/full time and taking a full university curriculum to boot.
Nov 9 '08 #16
gits
5,390 Recognized Expert Moderator Expert
i see ... and therefor i would recommend to have a look at the book at a library or in a bookshop first. the web is a good place to learn and for all javascript-related things MDC is a very good reference ... it always depends on the person whether a book or other ressources are to be preferred for learning ;) ... good luck with further learning in any way. of course you could always ask for help or explaination here in the forums ;)

kind regards
Nov 9 '08 #17
waltapp
31 New Member
Thanks again, I had not found this page in my many searches. I am sure that this will be a valuable resource.
Nov 9 '08 #18
waltapp
31 New Member
I just downloaded firebug a couple of days ago and switched browsers because of it. I did not find this resource though. It does not surprise me though because of the excellent debugger. It already made my last project easier. However debuggers only go so far. A human resource is a much better assistance in times of need. In really large code a good debugger is a neccessity I am sure. Do you have a better one that you use for your own coding?
Nov 9 '08 #19
waltapp
31 New Member
Back to coding;

So if I want to access the frameset rows from the current setting to "100.1.*" . The correct command would be:

parent.frameset .rows=("100.1.* ")

This is from the demo page and I want to change the frameset rows from the title page.
Nov 9 '08 #20

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

Similar topics

3
19784
by: Markus Ernst | last post by:
Hello Reading the follwing document: http://www.w3.org/TR/WD-positioning-970131#In-flow it seems very clear that position:relative should be relative to the parent element. So in the following test case element1 and element2 should be placed side by side inside a centered white container element: http://www.markusernst.ch/test.htm
0
2904
by: Walt Borders | last post by:
Hi, My problem: Merging two datasets deletes parent elements, preserves all children. I've created two dataSets. Each use the same schema, parent-child nested tables. The first dataSet is loaded with historical data read from an XML file. The second dataSet has current data filled from a dataGrid.
4
2237
by: jarek | last post by:
Hi, this is my code: CSSStyleDeclaration.prototype.__defineSetter__('display', displaySetter); function displaySetter(value) { var parent = findParent(document, this); if (parent) {
4
2924
by: patrizio.trinchini | last post by:
Hi all, I'm new to XSLT and maybe my problem have a very trivial answer, but I need an expert that point me in the right direction. What I would obtain is to remove all the elements that have a child element with an attribute set at a given value; maybe an example is more self-explaining... Given the following input XML document:
1
4655
by: Roy | last post by:
Hi, I have a parent document which has an iframe loaded in it. The iframe has an textfield element. I want to access this textfield element from the parent document. I have tried the following. But that doesn't work. (from the parent) window.frames.document.getElementById('idname')
3
11929
by: karthickdevi | last post by:
Hi, I have an iframe , say 'iframe01' in my parent document. In the same parent document, i have a div tag and inside the div tag, i have another iframe, say 'iframe02'. Now i want to access the iframe01 element from the iframe02. Please suggest me how can i do it. I have tried the following, but i get as undefined.
5
10475
by: Mel | last post by:
I need to access an element of my top window from inside an IFrame within that window. I tried: parent.MYFRAME.document.getElementById("LHS"); and i get a "Access Denied" is there a way to do this ?
0
2585
by: Guzeppi | last post by:
Hi, i'm using linq to load an xml structure into my classes. the xml consists of the same node nested for multiple levels e.g. <node id="node_id01" name="node 01"> <node id="node_id0101" name="node 01 01"> <node id="node_id010101" name="node 01 01 01"> <node id="node_id01010101" name="node 01 01 01 01"> <node id="node_id0101010101" name="node 01 01 01 01 01">
1
3811
by: bnchs | last post by:
This is C code. I am trying to fill each node's Parent field with its parent because I am drawing nodes to the screen. However, I have not been able to get this working. Reading the output from the code and tracing it, it seems that the code does not continue recursing down into the tree to insert. Can someone please point me to what is wrong and help me understand why it is wrong? Thank you. struct AvlNode* Insert( gint X, struct AvlNode*...
0
9642
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
10494
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...
0
10207
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
9317
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...
1
7748
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6951
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
5619
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...
1
4416
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
3
3076
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.