Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
function stops working?
Old 02-05-2011, 03:05 PM function stops working? [SOLVED]
Extreme Talker

Posts: 176
Trades: 0
I have a function(it adds text to a text area), it works the first time I load a page, and then keeps working if I keep using it, but if I edit the text myself, it no longer works, or if I have text in the box and refresh the page, it doesn't work.
Code:
function reply(id) {
        document.getElementById("replytext").innerHTML = "@post-" + id + "\n" + document.getElementById("replytext").innerHTML;
    }
EDIT: figured it out. realized that there's a difference between the innerhtml of a textarea and the value of it. using value instead gets the contents.

Last edited by Skeddles; 02-05-2011 at 06:29 PM..
Skeddles is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to function stops working?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21035 seconds with 12 queries