User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 423,720 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,157 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

javascript to add select button

Join Date: May 2005
Location: Wellington, New Zealand
Posts: 182
Reputation: alpha_foobar is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 3
alpha_foobar's Avatar
alpha_foobar alpha_foobar is offline Offline
Junior Poster

Re: javascript to add select button

  #6  
Jul 26th, 2005
Well, both IE and Mozilla basically do DOM the same way... it's just I've found some issues with IE when you actually want to preserve the data that you clone/move around the DOM... it's a little annoying.

When you clone a node, then its a clone... if you want/need to change any attributes then you have to be explicit about it. It is the same in IE.

And I'd say the 3 ways to create any dynamic html:
1. InnerHTML.
2. Deep Clone Node from Template.
3. Build DOM explicitly.

I use all 3... as I said, sometimes you don't care what happens to the DOM structure... so innerHTML is fine. Sometimes you want to create a complex html DOM tree, in which case it makes much more sense to use a template... and sometimes you just want to add a few nodes here and there...

Goro.. if you try Firefox + Venkman to build your apps, then you'd never go back to IE! Its miles ahead of windows script debugger.
Reply With Quote  
All times are GMT -4. The time now is 1:03 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC