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
    New Coder
    Join Date
    Aug 2010
    Posts
    14
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Textarea onchange detection

    Hi,

    How do I detect change event on textarea using javascript?
    I'm trying to detect any change, but without any type.

    For example, instead to have an "onclick submit button" to copy the contents of the textarea to another file, how it can be done automatically when focos is in?

    In short words, I want to submit a form without pressing a submit button!



    Regards

    Jan Lee
    Last edited by jan lee; 08-28-2010 at 02:13 PM.

  • #2
    New Coder
    Join Date
    Aug 2010
    Posts
    14
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Well,

    I put the following in the form, but it submit just a blank line.

    <form name="MyForm" method="post" action="next.asp" >
    <textarea id="PageURL" rows=20 cols=100 ></textarea>
    <script type="text/javascript" language="JavaScript">
    document.MyForm.PageURL.value = document.URL;
    document.MyForm.submit();
    </script>
    </form>
    Jan Lee


  •  

    Posting Permissions

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