Hi,
say you have an input from a form, and you want to be able to refer to
a containing tag, without knowing its particular name. For example, in
the following:
<div id="div1">
<select name="myinput" onChange="chang eDiv( ??? ,
this.selected.t ext);">
<option>....</option>
<option>...</option>
</select>
</div>
<div id="div2">
.....(similar content)
</div>
What I want to do where the "???"s are is pass it a reference to the
"div1" tag. If we use the "this" keyword in that onChange, it refers
to the "myinput" droplist, so is there a property of any object to
access its next-highest encompassing tag/object/frame/div/form in
particular?
Thx,
--
Bl 2 1290
drblitzkr...@gm ail.com wrote:
Hi,
say you have an input from a form, and you want to be able to refer to
a containing tag, without knowing its particular name. For example, in
the following:
<div id="div1">
<select name="myinput" onChange="chang eDiv( ??? ,
this.selected.t ext);">
<option>....</option>
<option>...</option>
</select>
</div>
<div id="div2">
....(similar content)
</div>
What I want to do where the "???"s are is pass it a reference to the
"div1" tag. If we use the "this" keyword in that onChange, it refers
to the "myinput" droplist, so is there a property of any object to
access its next-highest encompassing tag/object/frame/div/form in
particular?
If you are talking about DOM objects, then you are looking for the
parentNode property.
<URL: http://www.w3.org/TR/DOM-Level-2-Cor...#ID-1060184317 >
--
Rob
Response to RobG <rg***@iinet.ne t.au>:
If you are talking about DOM objects, then you are looking for the
parentNode property.
To this day I respectfully use your "getOutermostDi v" function.
Although, it works on anything and isn't called that exactly. ; )
--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Anonymous |
last post by:
Is namespace the same thing as scope? While reading the book
"Thinking in C++", I was under the impression that namespace is, well,
a namespace--a feature to create a hiearchy for identifiers within the
Global Namespace. And that, all identifiers within a given namespace,
however deeply nested they are, each of them has the Global Scope.
So, if
namespace outer {
int a = 1;
|
by: pembed2003 |
last post by:
Hi all,
I am reading the book "C++ How to Program" and in the chapter where it
discuss scope rule, it says there are four scopes for a variable:
function scope
file scope
block scope
function-prototype scope
I think(might be wrong):
|
by: black ball magazine |
last post by:
Black Ball Magazine. The first one. new news at rec.climbing until web
domain setup.
I posted the following message at the end of the message.
Playboy%49/%51Netscape is coming out with the new compiler os.
Website is coming out for Black Ball Magazine. New news about this
google groups alt.freemasonry, rec.climbing (reason gyms are freemason
lodges)
|
by: pembed2003 |
last post by:
Hi all,
I am reading the book "C How to Program" and in the chapter where it
discuss scope rule, it says there are four scopes for a variable:
function scope
file scope
block scope
function-prototype scope
I think(might be wrong):
|
by: TTroy |
last post by:
I have a few questions about "scope" and "visibility," which seem like
two different things.
To me "visibility" of the name of a function or object is the actual
code that can use it in an actual program.
To me "scope" of the name of a function or object are the general rules
for the areas of a program that can through a declaration, have
"visibility."
| |
by: Gery D. Dorazio |
last post by:
Gurus,
If a static variable is defined in a class what is the scope of the variable
resolved to for it to remain 'static'? For instance, lets say I create a
class library assembly that is strongly name which contains the class where
the static variable is defined. This library can be referenced by multiple
projects. I am fairly sure the static variable does not survive across the
application boundry but does it within the application...
|
by: marco_segurini |
last post by:
Hi,
I am using VS 2005.
If I compile the following code only line 6 returns me an error while
line 9 returns a warning. If I comment the line 6 and debug the
program the assignments of lines {9, 11} work fine.
Why the '.' "scope operator" is accepted in line 9 and not in line 6?
|
by: utab |
last post by:
Dear all,
Is there a clear distinction how to decide which functions to be
members of a class and which not
How is your attitude (Your general way from your experiences ...)
"If the function changes the state of the object, it ought to be a
member of that object." Reference Accelerated C++, A. Koenig, page 159.
|
by: Christian Christmann |
last post by:
Hi,
I've a a question on the specifier extern.
Code example:
void func( void )
{
extern int e;
//...
|
by: pbmods |
last post by:
VARIABLE SCOPE IN JAVASCRIPT
LEVEL: BEGINNER/INTERMEDIATE (INTERMEDIATE STUFF IN )
PREREQS: VARIABLES
First off, what the heck is 'scope' (the kind that doesn't help kill the germs that cause bad breath)? Scope describes the context in which a variable can be used. For example, if a variable's scope is a certain function, then that variable can only be used in that function. If you were to try to access that variable anywhere else in...
|
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: 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...
|
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: 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...
|
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...
| |
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: 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...
| |