Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes java script remove element by id Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "java script remove element by id" Watch "java script remove element by id" New topic
Author

java script remove element by id

namita sasa
Ranch Hand

Joined: Apr 20, 2009
Posts: 56
When we use removeElement function, will it delete element permanently or just for that particular selection if I write it in onClick() event?

Help!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60783
    
  65

What do you mean by "just for that particular selection"?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

And "permanently"?
namita sasa
Ranch Hand

Joined: Apr 20, 2009
Posts: 56
I have three radio buttons. On page load, it preselects some choice and removes some fields. But, if user clicks on another choice now, all fields should exist and now again second radio button will remove some of them.
On page load, when button is pre-selected, if it permanently removes form fields, my second radio button won't work correctly.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60783
    
  65

Then don't remove them from the DOM. Simply hide them using CSS.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java script remove element by id
 
Similar Threads
Problem with positioning div
html table to excel problem
finding previous element of current element
DTD content model question
Trying to create an array full of ongoing numbers with add/remove buttons, not showing up on page