Page 1 of 1

Javascript for forms

Posted: Wed Apr 29, 2009 10:18 am
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.

Re: Javascript for forms

Posted: Wed Apr 29, 2009 4:09 pm
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]