HighDots Forums  

innerHTML for elements and FireFox

Javascript JavaScript language (comp.lang.javascript)


Discuss innerHTML for elements and FireFox in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jeff
 
Posts: n/a

Default innerHTML for elements and FireFox - 03-10-2008 , 08:34 PM






I have a form and I'm adding form elements inside the form by
assembling the string and then using innerHTML to add them.

IE does not complain , but FireFox does not recognize the additions
(ie, if I check document['some_form'].length, the length remains the same).

What's the reason for that? Do I need to use DOM methods?

Jeff

Reply With Quote
  #2  
Old   
T.J. Crowder
 
Posts: n/a

Default Re: innerHTML for elements and FireFox - 03-10-2008 , 08:56 PM






On Mar 11, 12:34 am, Jeff <jeff (AT) spam_me_not (DOT) com> wrote:
Quote:
I have a form and I'm adding form elements inside the form by
assembling the string and then using innerHTML to add them.

IE does not complain , but FireFox does not recognize the additions
(ie, if I check document['some_form'].length, the length remains the same).

What's the reason for that? Do I need to use DOM methods?

Jeff
Can you post a minimal test case showing what you're doing that isn't
working? That's usually helpful -- either because by creating it you
solve the problem yourself before posting (amazing how often that
happens!), or because it gives folks on the list more info to work
with... :-) It may also be worth inspecting the form via Firebug or
some such after you've modified it; you're probably not quite
inserting what you think you're inserting, something like that.

Hope this helps,
--
T.J. Crowder
tj / crowder software / com


Reply With Quote
  #3  
Old   
Jeff
 
Posts: n/a

Default Re: innerHTML for elements and FireFox - 03-10-2008 , 10:28 PM



T.J. Crowder wrote:
Quote:
On Mar 11, 12:34 am, Jeff <jeff (AT) spam_me_not (DOT) com> wrote:
I have a form and I'm adding form elements inside the form by
assembling the string and then using innerHTML to add them.

IE does not complain , but FireFox does not recognize the additions
(ie, if I check document['some_form'].length, the length remains the same).

What's the reason for that? Do I need to use DOM methods?

Jeff

Can you post a minimal test case showing what you're doing that isn't
working? That's usually helpful -- either because by creating it you
solve the problem yourself before posting (amazing how often that
happens!),

Well, I found it.

I had the form inside the table, and reversing that so the table was
inside the form fixed it.

Thanks,
Jeff


or because it gives folks on the list more info to work
Quote:
with... :-) It may also be worth inspecting the form via Firebug or
some such after you've modified it; you're probably not quite
inserting what you think you're inserting, something like that.

Hope this helps,
--
T.J. Crowder
tj / crowder software / com

Reply With Quote
Reply




Thread Tools
Display Modes

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

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.