By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,341 Members | 1,693 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,341 IT Pros & Developers. It's quick & easy.

javascript error in text editor

P: 40
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Untitled Document</title>
  6. <script type="text/javascript">
  7. function append(){
  8.     var a = document.getElementById("fname").value
  9.     var b = document.getElementById("lname").value
  10.     document.getElementById("nameval").value=a+'\n'+b;
  11. }
  12. </script>
  13. </head>
  14. <body>
  15. <form name="samp" method="post">
  16. First Name:<input type="text" name="fname" id="fname"/>
  17. Last Name:<input type="text" name="lname" id="lname"/>
  18. Show Name:
  19. <textarea cols="30" rows="6" id="nameval" name="nameval" onfocus="append();"></textarea>
  20. </form>
  21. </body>
  22. </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.
Aug 4 '09 #1
Share this Question
Share on Google+
2 Replies


Dormilich
Expert Mod 5K+
P: 8,639
do you know whether the text editor supports Javascript?
Aug 4 '09 #2

P: 40
yes it supports javascript. Am using openwysiwyg_v1.4.7 and also FCKeditor.
Aug 4 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.