[thelist] Vanishing appendchild()

Tom Dell'Aringa pixelmech at yahoo.com
Tue Aug 5 13:15:55 CDT 2003


--- "M.G. Noriega" <manuel at simplelogica.net> wrote:
> 
> Hi, i'm trying to improve my forms and learn some DHTML at the same
> time. Now, i've stepped on my newbieness to DOM scripting
> 
> http://simplelogica.net/test/append.html
> 
> 
> What i want to do is add some inputs to a form as needed, via a the
> 'plus' link. However, the new input appears for a second and then
> vanishes. Bad input, bad :)
> 
> Could someone enlighten me about whatever obvious mistake i'm
> making?

Start kicking yourself :) You are using a link... to run your
function, which is executing and reloading your page. It disappears
when the page loads. You could add a return false; after your
function call. Or you could do better by using a button input
instead. Your code is fine.

Tom

=====
http://www.pixelmech.com/ :: Web Development Services
http://www.DMXzone.com/ :: Premium Content Author / JavaScript / Every Friday!
http://www.maccaws.com/ :: Group Leader
[Making A Commercial Case for Adopting Web Standards]

"That's not art, that's just annoying." -- Squidward


More information about the thelist mailing list