Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    First of all, you posted this in the wrong section. Anyways, one of the mods will move this for you.

    Anyway, it could. What's being stored by divall variable?
    Also, show us the related markups.
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • #3
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    The 'divall' is an div id which i defined as
    <div id="divall" style="display:none;"></div>
    If user click on the link-1, iam adding the textarea and button to the div

    Regards,
    Mohan

  • #4
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    Then, surround it with quotes.
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph


  •  

    Posting Permissions

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