Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-21-2002, 04:28 PM   PM User | #1
Keltoi
Regular Coder

 
Join Date: Jun 2002
Location: Lincoln (UK)
Posts: 138
Thanks: 3
Thanked 0 Times in 0 Posts
Keltoi is an unknown quantity at this point
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?
Keltoi is offline   Reply With Quote
Old 06-21-2002, 04:47 PM   PM User | #2
JohnKrutsch
Regular Coder

 
Join Date: Jun 2002
Location: The Planet Earth Code Poet: True
Posts: 282
Thanks: 0
Thanked 1 Time in 1 Post
JohnKrutsch is an unknown quantity at this point
onclick="window.document.formmain.notes.value='add this'+window.document.formmain.notes.value"
JohnKrutsch is offline   Reply With Quote
Old 06-21-2002, 04:56 PM   PM User | #3
Keltoi
Regular Coder

 
Join Date: Jun 2002
Location: Lincoln (UK)
Posts: 138
Thanks: 3
Thanked 0 Times in 0 Posts
Keltoi is an unknown quantity at this point
Thanks John, that was starting to bug me.
Keltoi is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 01:23 PM.


Advertisement
Log in to turn off these ads.