Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 4.50 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-08-2003, 05:39 PM   PM User | #1
Jerome
Regular Coder

 
Join Date: Oct 2002
Posts: 299
Thanks: 0
Thanked 0 Times in 0 Posts
Jerome is an unknown quantity at this point
remove child by ID

Hi,

Already read the thread from Graeme, but still doen't understand it completely.

How can I remove a div with an id, without saying it's child-number x from the body or else.

Basicly I want:

remove: document.getElementById('divx') ;

Thanks for Your time,
Jerome
Jerome is offline   Reply With Quote
Old 07-08-2003, 06:59 PM   PM User | #2
mordred
Senior Coder


 
Join Date: Jun 2002
Location: frankfurt, german banana republic
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
mordred is an unknown quantity at this point
You're almost there...

Code:
var elm = document.getElementById('divx');
elm.parentNode.removeChild(elm);
__________________
De gustibus non est disputandum.
mordred is offline   Reply With Quote
Old 07-08-2003, 08:08 PM   PM User | #3
Jerome
Regular Coder

 
Join Date: Oct 2002
Posts: 299
Thanks: 0
Thanked 0 Times in 0 Posts
Jerome is an unknown quantity at this point
Herzlichen Dank...

Jerome
Jerome is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:49 PM.


Advertisement
Log in to turn off these ads.