TalkPHP
 
 
Account Login
Latest Articles
» How to keep your forms from double posting data
» cURL Basics
» Securing your PHP applications Part 1
» The way the function rolls
» Database Abstraction with Zend_Db - Part 2
Advertisement
Associates
Associates
techtuts Darkmindz
CSS Tutorials Tutorialsphere.com - Free Online Tutorials
Boston PHP SurfnLearn
Reply
 
LinkBack Thread Tools Display Modes
Old 05-08-2008, 04:16 PM   #1 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Location: On your Hard Drive, hiding like a Virus
Posts: 782
Thanks: 154
Orc is on a distinguished road
Default Adding more values than just one in forms.

I'm using javascript, and I have an onclick in a form to say:
this.form.test.value = 'ttt'; which adds ttt, but doesnt add it any further, can someone help me with this?

and how can I stop it from deleting previous values in test input.

Update: so far I only got this: this.form.test.value = this.form.test.value+'ttt'; which updates it further more and doesnt destroy any previous data, is this the only way to go?
__________________
Wax on, Wax off
Orc is offline  
Reply With Quote
Old 05-08-2008, 04:19 PM   #2 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 221
Thanks: 2
Jim is on a distinguished road
Default

I haven't tested it, but what about +=? (or .= on the PHP way)
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
Reply With Quote
Old 05-08-2008, 04:21 PM   #3 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Location: On your Hard Drive, hiding like a Virus
Posts: 782
Thanks: 154
Orc is on a distinguished road
Default

Quote:
Originally Posted by Jim View Post
I haven't tested it, but what about +=? (or .= on the PHP way)
Thanks! += works, but .= gives me syntax errors
__________________
Wax on, Wax off
Orc is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:17 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0