Closed Thread
Results 1 to 2 of 2

Thread: javascript error in text editor

  1. #1
    Divya is offline Learning Programmer
    Join Date
    Apr 2008
    Location
    India
    Posts
    32
    Rep Power
    0

    javascript error in text editor

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script type="text/javascript">
    function append(){
    	var a = document.getElementById("fname").value
    	var b = document.getElementById("lname").value
    	document.getElementById("nameval").value=a+'\n'+b;
    }
    </script>
    </head>
    <body>
    <form name="samp" method="post">
    First Name:<input type="text" name="fname" id="fname"/>
    Last Name:<input type="text" name="lname" id="lname"/>
    Show Name:
    <textarea cols="30" rows="6" id="nameval" name="nameval" onfocus="append();"></textarea>
    </form>
    </body>
    </html>

    in the above code, if i use a text editor in place of text area the append function is not working. Please help me in this issue.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: javascript error in text editor

    text doesn't support multiple lines.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Text Editor
    By hudbarnett in forum PHP Development
    Replies: 2
    Last Post: 08-31-2010, 12:27 AM
  2. Text Editor [C]
    By 539 in forum C and C++
    Replies: 1
    Last Post: 05-07-2010, 05:31 PM
  3. My new text editor
    By DarkLordoftheMonkeys in forum General Programming
    Replies: 3
    Last Post: 01-23-2010, 02:50 PM
  4. Text Editor vs IDE?
    By Psynic in forum General Programming
    Replies: 3
    Last Post: 05-28-2009, 11:42 AM
  5. C++ Text Editor Development
    By Natsuki in forum C and C++
    Replies: 7
    Last Post: 03-26-2008, 04:58 AM

Tags for this Thread

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