Javascript for forms

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
JKM
Forum Contributor
Posts: 221
Joined: Tue Jun 17, 2008 8:12 pm

Javascript for forms

Post by JKM »

Hi there,

I've seen some javascript in forms, but I can't find the actually scripts. I'm looking for a script that removes the value when clicking on the input field (text).

Any help? :)

Edit:
This is a part of my form:
ALL: <input type="checkbox" name="boxALL" /> <input type="text" name="boxALLvalue" /> <a href="javscript: do('update');">update</a><br />
1: <input type="checkbox" name="box1" /> <input type="text" name="box1value" /><br />
2: <input type="checkbox" name="box2" /> <input type="text" name="box2value" /><br />
3: <input type="checkbox" name="box3" /> <input type="text" name="box3value" /><br />

If you press the update-link, it should check all boxes with the name "box<number>" and insert the value from boxALLvalue to all the other checkboxes.
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: Javascript for forms

Post by kaszu »

Code: Select all

javscript&#058; do('update');
just calls do function passing as first parameter string 'update'. do() function is most likely defined in a separate .js file or somewhere else on a page in <script> tags.

Please use

Code: Select all

tags[/url]
Post Reply