Page 1 of 1

[SOLVED] createElement() Trouble

Posted: Sun Aug 07, 2005 5:13 pm
by kaYak
OLD:
Hello,

I have a script that creates rows in a table and it puts a file input using innerHTML into each row. For some reason when I submit it it submits the non-JavaScript created ones but not the JavaScript created ones. Is there another way I should be inserting the file inputs other than using innerHTML? I'm thinking because it is JavaScript they aren't actually there for some reason. Anyone know what's wrong?

UPDATE: It doesn't work in FireFox but it works in Internet Explorer, is this just a FireFox incompatibility then?
NEW:
CreateElement Problem: Is it possible to append a form to the inside of a table so the inputs can be aligned with table rows? I have a table and I just wanted to insert new rows into it with the inputs inside but then it won't apply to the form. So I thought maybe if I created the table, form, and inputs all with createElement it might work. I've tried appending the form to the table and it doesn't seem to be working.

Does anyone have knowledge of CreateElement that might be able to help me with this setup?

----------------------------------------------------

SOLUTION: I found that I had to have the form tags around the table or it would not work in FireFox. This was simply the problem. I made the cells of equal size to align them without having to have them in the same table and it worked fine. I was over complicating a simple problem.

----------------------------------------------------

Thanks,
Kyle

Posted: Sun Aug 07, 2005 6:09 pm
by feyd
CreateElement()

Posted: Wed Aug 10, 2005 1:56 pm
by kaYak
I tried createElement but when I append it to the form it messes up the display and submits properly, and when I append it to the table it display properly but doesn't submit right. I need to keep the display and submit it properly. The form resides within the table and I can't get it t reference properly, can someone help me? I've tried table_id.form_id but it doesn't seem to work.