Event Handler Question

P

Papajo

 To trigger the save function of this cookie script it uses an
onChange="saveValue()" event handler in the textarea, now, I've been
trying to get an onClick="saveValue()" to work with no luck, any
thoughts why a button won't work? Any help is appreciated. Joe
PS: the onChange has been removed in this demo version

http://web2jo.com/txt_3/MultiCookie.html
 
L

Lee

Papajo said:
=A0To trigger the save function of this cookie script it uses an
onChange=3D"saveValue()" event handler in the textarea, now, I've been
trying to get an onClick=3D"saveValue()" to work with no luck, any
thoughts why a button won't work? Any help is appreciated. Joe
PS: the onChange has been removed in this demo version

http://web2jo.com/txt_3/MultiCookie.html

The saveValue() function takes an argument:

function saveValue(element) {

You're not passing it one.
You need to pass a reference to the form control whose value
you want to save:

onclick="saveValue(this.form.one)"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top