How to Submit input from text to output in textarea

Discussion in 'JavaScript' started by anilinkz, Aug 16, 2010.

  1. #1
    need help with this...

    i have a
    <input type="text" name="url" /><input type="submit" />
    HTML:
    outside of a <form>

    and when i input a url on the "url" text and press submit, it will get the source code of the url and input it to the textarea without refreshing.

    more like file_get_contents() of PHP but in javascript..

    TIA
     
    anilinkz, Aug 16, 2010 IP
  2. Thorlax402

    Thorlax402 Member

    Messages:
    194
    Likes Received:
    2
    Best Answers:
    5
    Trophy Points:
    40
    #2
    In order to do this without refreshing you will need to use ajax. I recommend using a jquery form plugin from http://jquery.malsup.com/form/. I have been using it recently and it has been great so far.
     
    Thorlax402, Aug 16, 2010 IP