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 2 of 2
  1. #1
    Regular Coder
    Join Date
    Mar 2006
    Location
    Nigeria
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Adding content into a webpage

    Any ideas how i can use JS to insert new content into a web page content. Say for example I have a simple form with a button that allows user to add extra input elements, say for multiple uploads or whatever. How do i go about this?
    actuslly thought of document. write but this overerites the existing content of the page. At another thought, AJAX doesnt seem to be the best of option. Im currently working on using js/css document.getElementById() but was just wondering there might be a simpler solution.

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,505
    Thanks
    3
    Thanked 501 Times in 488 Posts
    where to start?

    DOM is normally a good option

    but first you need to define what to add and where
    Vic

    God Loves You and will never love you less.

    http://www.vicsjavascripts.org/Home.htm

    If my post has been useful please donate to http://www.operationsmile.org.uk/


  •  

    Posting Permissions

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