Computing.Net > Forums > Web Development > javascript ..?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

javascript ..?

Reply to Message Icon

Name: Jamie_McCoy
Date: April 10, 2005 at 18:12:23 Pacific
OS: XP Pro 5.1
CPU/Ram: Pentium 4 2.4Ghz
Comment:

hi, i want to capture the current contents of a text field

in turn, i want to add an emoticon adder, where as u click on an emoticon which inserts the code into the text field

as i have it now, when you click to insert emoticon code, it replaces what ever has been typed in the field....

i need it to just add to it

so

currentvalue+emoticoncode

that type....

roamhosting.net



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: April 10, 2005 at 21:05:42 Pacific
Reply:

Assuming that the form name is "theForm" and the field name is "theField" you would simply do the following:

document.theForm.theField.value += 'emoticoncode'


The += means that the element before will equal itself plus whatever comes next. Son instead of a = a + b, you can use a += b

Michael J


0

Response Number 2
Name: Jamie_McCoy
Date: April 11, 2005 at 01:28:52 Pacific
Reply:

excellent m8 !

roamhosting.net


0

Response Number 3
Name: Jamie_McCoy
Date: April 11, 2005 at 16:39:46 Pacific
Reply:

another problem tho with these popups..

say i have a page, with a load of content... scroll bar etc... well when you click to launch a popup, you are placed back at the top of the page, kind of like an anchor....

roamhosting.net


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


need a link to download..... PHP GD library, multistep...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: javascript ..?

javascript importance www.computing.net/answers/webdevel/javascript-importance/3326.html

Javascript - SN u wud be useful www.computing.net/answers/webdevel/javascript-sn-u-wud-be-useful/1648.html

javascript menu www.computing.net/answers/webdevel/javascript-menu/1687.html