JavaScript and client side scripting.
Moderator: General Moderators
-
anjanesh
- DevNet Resident
- Posts: 1679
- Joined: Sat Dec 06, 2003 9:52 pm
- Location: Mumbai, India
Post
by anjanesh »
I have
Code: Select all
var oInput = document.createElement("e;INPUT"e;);
// Set the attributes
How do I add it to a form ?
Like document.getElementById("frm").addElement(oInput);
Thanks
Last edited by
anjanesh on Thu Jun 23, 2005 5:07 am, edited 1 time in total.
-
phpScott
- DevNet Resident
- Posts: 1206
- Joined: Wed Oct 09, 2002 6:51 pm
- Location: Keele, U.K.
Post
by phpScott »
one way is to
Code: Select all
document.getElementById('someElementName').innerHTML=newElement
be careful though as this will over write everything with someElementName
innerHTML is what you want
-
anjanesh
- DevNet Resident
- Posts: 1679
- Joined: Sat Dec 06, 2003 9:52 pm
- Location: Mumbai, India
Post
by anjanesh »
works in IE and FF.
If there are some issues with this please let me know.
Seems to be doing to job though.