Results 1 to 2 of 2

Thread: Is inner html elements can recognised by form or not ?

  1. #1
    Join Date
    Jun 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Is inner html elements can recognised by form or not ?

    Hi,

    In my web page, iam trying to show the form elements dynamically.
    when user clicks on lets say link-1, then i have to show the text box and button. and i done like this:

    document.getElementById(divall).innerHTML=
    '<textarea name="message" cols="80" rows="2"></textarea>
    <input type="button" class="button" name="messagebutton" value="Send" onclick="send(this.form,id)";/>'

    Here, textarea is not recognised by the form.
    Is inner html elements can recognised by form or not ?
    Thanks in advance.

    Regards,
    Mohan

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Not. Use DOM level 2 create and append when adding elements to forms.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •