Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Dynamic Checkbox onClick
- From: javascript@xxxxxxxxxx (Andrew McCombe)
- Subject: [Javascript] Dynamic Checkbox onClick
- Date: Mon, 27 Jan 2003 12:11:00 -0000
Hi
I'm creating a form with a variable amount of checkboxes. I've got the
following that is working fine:
var check = document.createElement("input");
check.setAttribute("type","checkbox");
check.setAttribute("name","fault[]");
check.setAttribute("value",handset[myHandset][i]);
check.setAttribute("onClick","faultChecked(this);");
I want to call a function 'faultChecked()' when the box is clicked. Setting
the attribute as above doesn't work - is it the right way to set it or is
there another way?
Andrew
- Follow-Ups:
- [Javascript] Dynamic Checkbox onClick
- From: Mike Ledig
- [Javascript] Dynamic Checkbox onClick
- Prev by Date: [Javascript] <META HTTP-EQUIV="Refresh" CONTENT="15;URL=javascript:showListPage()">
- Next by Date: [Javascript] Dynamic Checkbox onClick
- Previous by thread: [Javascript] <META HTTP-EQUIV="Refresh" CONTENT="15;URL=javascript:showListPage()">
- Next by thread: [Javascript] Dynamic Checkbox onClick
- Index(es):