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
Javascript code needed
Old 09-13-2009, 05:24 PM Javascript code needed
Junior Talker

Posts: 3
Name: Adam lee riley
Trades: 0
I need a javascript code that when a image is clicked on it will add some text to a textarea
Adamriley162 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-13-2009, 05:51 PM Re: Javascript code needed
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.webmaster-talk.com/showthread.php?t=154771
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-13-2009, 06:18 PM Re: Javascript code needed
Junior Talker

Posts: 3
Name: Adam lee riley
Trades: 0
Chrishirst thanks for the reply but your script is not what i wanted maybe that i did not explain what i wanted
~~~~~~~~~~~~
i want a script that adds a message to a textarea when a image Is clicked on and also the text area should not be able to change e.g.the user cannot change the box

Last edited by Adamriley162; 09-13-2009 at 06:22 PM..
Adamriley162 is offline
Reply With Quote
View Public Profile
 
Old 09-13-2009, 06:39 PM Re: Javascript code needed
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
And that is what the code I linked to can do.

If you want to have the textarea disabled then you can.

you simply add an onclick event to whatever element you wish to use and pass whatever text string you want to the function, which is then inserted into the textarea.

If anything, the script is OTT for what you need and all you probably need is

Code:
<img src="blah-blah"  onclick="document.formname.textareaname.value='Whatever text you want to put in it'" />
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-13-2009, 06:53 PM Re: Javascript code needed
Junior Talker

Posts: 3
Name: Adam lee riley
Trades: 0
Thanks you said if the script is anything it is ott then could you please simplify the code as i am very tired and i have a banging headache please
Adamriley162 is offline
Reply With Quote
View Public Profile
 
Old 09-13-2009, 07:02 PM Re: Javascript code needed
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
then could you please simplify the code
You mean as I just did in the post above?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-13-2009, 07:29 PM Re: Javascript code needed
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
I'd say: http://www.getafreelancer.com/
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 09-13-2009, 07:30 PM Re: Javascript code needed
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Javascript code needed
 

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.57012 seconds with 12 queries