CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript programming (http://www.codingforums.com/forumdisplay.php?f=2)
-   -   adding information to text area - error (http://www.codingforums.com/showthread.php?t=503)

Keltoi 06-21-2002 04:28 PM

adding information to text area - error
 
I'm trying to add some content to a text area form element before the content of the text area.

I can do it, so that the added content apears after the text area content but if I switch the script around I get an error.

This works:
Code:

onClick="window.document.formmain.notes.value += 'add this'"
But if I try this then the error occurs:
Code:

onClick="'add this' += window.document.formmain.notes.value"
Any ideas?

JohnKrutsch 06-21-2002 04:47 PM

onclick="window.document.formmain.notes.value='add this'+window.document.formmain.notes.value"

Keltoi 06-21-2002 04:56 PM

Thanks John, that was starting to bug me. :thumbsup:


All times are GMT +1. The time now is 11:21 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.