473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Display: [object MyXyzElement] instead of: [object HTMLUnknownElement] for <xyz>?

Using this test:

<html>
<body>
<xyz>
<form>
<input type="checkbox" onchange="alert(this);
alert(this.parentNode.previousSibling);">
</form>
</body>
</html>

The two alerts display:

[object HTMLInputElement]
[object HTMLUnknownElement]

How can I define the string to be displayed for <xyz>?
--
C.W.Holeman II | cw***@Julian5Locals.com -5 | http://JulianLocals.com/cwhii
To only a fraction of the human race does God give the privilege of
earning one's bread doing what one would have gladly pursued free, for
passion. I am very thankful. The Mythical Man-Month Epilogue/F.P.Brooks
Apr 1 '07 #1
3 3876
C.W.Holeman II wrote:
Using this test:

<html>
<body>
<xyz>
<form>
<input type="checkbox" onchange="alert(this);
alert(this.parentNode.previousSibling);">
</form>
</body>
</html>

The two alerts display:

[object HTMLInputElement]
[object HTMLUnknownElement]

How can I define the string to be displayed for <xyz>?
<html>
<body>
<div></div>
<form>
<input type="checkbox" onchange="
alert(this);
alert(this.parentNode.previousSibling);
alert(this.parentNode.parentNode.previousSibling); ">
</form>
</body>
</html>
Mick
Apr 2 '07 #2
"Michael White" <mi**@mickweb.comwrote in message
news:46***********************@roadrunner.com...
C.W.Holeman II wrote:
>Using this test:

<html>
<body>
<xyz>
<form>
<input type="checkbox" onchange="alert(this);
alert(this.parentNode.previousSibling);">
</form>
</body>
</html>

The two alerts display:

[object HTMLInputElement]
[object HTMLUnknownElement]

How can I define the string to be displayed for <xyz>?
....
alert(this.parentNode.parentNode.previousSibling); ">
I am looking not for the path to <xyzbut rather how
define the string that is used when this.parentNode.previousSibling
is converted to a string for alert().

--
C.W.Holeman II | cw***@Julian5Locals.com -5 | http://JulianLocals.com/cwhii
To only a fraction of the human race does God give the privilege of
earning one's bread doing what one would have gladly pursued free, for
passion. I am very thankful. The Mythical Man-Month Epilogue/F.P.Brooks

Apr 2 '07 #3
"C.W.Holeman II" <cw***************@yahoo.comwrote in message
news:13************@corp.supernews.com...
"Michael White" <mi**@mickweb.comwrote in message
news:46***********************@roadrunner.com...
>C.W.Holeman II wrote:
>>Using this test:

<html>
<body>
<xyz>
<form>
<input type="checkbox" onchange="alert(this);
alert(this.parentNode.previousSibling);">
</form>
</body>
</html>

The two alerts display:

[object HTMLInputElement]
[object HTMLUnknownElement]

How can I define the string to be displayed for <xyz>?
...
>alert(this.parentNode.parentNode.previousSibling) ;">

I am looking not for the path to <xyzbut rather how
define the string that is used when this.parentNode.previousSibling
is converted to a string for alert().
I do not believe anything is converted to a string. I believe it more or less uses a
predefined text.

Basically, use valid HTML or you are going to get HTMLUnknownElement objects.

-Lost
Apr 3 '07 #4

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

Similar topics

13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
6
by: Joe | last post by:
I have a: vector<string> which contains a few dozen elements. I want to find the index of the element containing a certain string. for example: vector<string> strings;...
2
by: js | last post by:
I have a table rendered with XSLT. The first column has a radio button controls for user to make a selection for a particular row. All the values in the remaining columns are all concated with a...
19
by: Werner Partner | last post by:
I have such a construction: <span id="xyz">Hello world</span> <span id="xyz">Hello Nordrhein-Westfalen</span> Validator critizises (oh!) that there is twice the same span. the problem is...
14
by: Stefan Mueller | last post by:
With the following code I can add a new row to an existing table. That really works great. Many thanks to all who helped me so far. But my problem is that the added cells do somehow not have the...
1
by: JJ | last post by:
I am writing instruction to accompany my 'sendNewsletter' page. In the text I want to instruct the user that by writing <%username%> in the text, this placeholder will be replaced by the...
16
by: network-admin | last post by:
We have Problems with Access query on Oracle 10g Database with ODBC Connection. The Query_1 is such as select * from xtable where ycolumn <"S" Result = ODBC Faild...
5
by: .Net Sports | last post by:
I'm having problems trying to get a record out of a resultset when working with a Datalist control. <%# Container.DataItem( "myfield" )%is how I am displaying the field , but when trying to do an...
3
by: fastestindian | last post by:
Hi, I am working on the project where i show a list of Log Records. my list is as follows. Original list Id Time Event Details 1 1 Error1 xyz 2 1 ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

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.