What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Javascript Help

Javascript Help
Author: Message:
wj
Former Admin
*****

Avatar
I aim to misbehave.

Posts: 2224
Reputation: 52
39 / – / Flag
Joined: Mar 2002
O.P. Javascript Help
Hey Guys! Need some JS help.

I need to add about 5 text links right above a text area to add quick texts to the text box. Now I've got about 30 text boxes on the page (all textareas) and I need one set for each.

The text area names are like: notes[3595]
The quick texts are going to be something like: "On hold for parts" or "Playing with my yonker to piss you off"

The text needs to be appended to the notes feild.

How do I accomplish this?
"A towel is about the most massively useful
thing an interstellar hitchhiker can have."
09-23-2005 04:44 PM
Profile PM Find Quote Report
hmaster
Senior Member
****

Avatar

Posts: 716
Reputation: 24
33 / Male / Flag
Joined: Nov 2004
RE: Javascript Help
Im not sure I get what you mean ? Like when you click it it displays a message?
[Image: sig.png]
09-23-2005 05:21 PM
Profile PM Web Find Quote Report
wj
Former Admin
*****

Avatar
I aim to misbehave.

Posts: 2224
Reputation: 52
39 / – / Flag
Joined: Mar 2002
O.P. RE: Javascript Help
When I click a link, I want it to add a preset text to the associated text area. Similar to the quick quote function, but I need to do it with mulitple text areas.


document.input.notes[333].value += 'test';

Doing that gives me an error. How do I deal with the fact they all have the array style name. And no it cant be changed.

This post was edited on 09-23-2005 at 05:26 PM by wj.
"A towel is about the most massively useful
thing an interstellar hitchhiker can have."
09-23-2005 05:24 PM
Profile PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: Javascript Help
code:
<script language="javascript">
function quotethingforwj(quote,id){
blah = document.getElementsByName('notes[' + id + ']');
old = blah[0].value;
blah[0].value = old + quote;
}
</script>

e.g

<a href="javascript:quotethingforwj('if omar would pay, i would come', 1)">add quote</a>
<textarea name="notes[1]" value=""></textarea>
09-23-2005 05:49 PM
Profile PM Find Quote Report
wj
Former Admin
*****

Avatar
I aim to misbehave.

Posts: 2224
Reputation: 52
39 / – / Flag
Joined: Mar 2002
O.P. RE: Javascript Help
THANK YOU LEE JEFFERY!!!!!

THANK YOU THANK YOU THANK YOU THANK YOU./
"A towel is about the most massively useful
thing an interstellar hitchhiker can have."
09-23-2005 07:10 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On