By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,584 Members | 3,458 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,584 IT Pros & Developers. It's quick & easy.

Changing CheckBox Status on HTML Page...

P: n/a
Thx to Mr. Gaurav, I have follow your instructions and thanks for your help,
the
checkbox change status when has a first click on it, but.. when I repeatedly
clicking on it, the value doesn't change anymore.., here is my code:

// HTML
function JSGeneratePackageID()
{
if (document.getElementById("chb_vIsDefect").selected )

// Can't work, how to change checkbox value?
document.getElementById("chb_vIsDefect").selected = false;

document.getElementById("lbl_vValue").innerText = "false";

else

// Can't work, how to change checkbox value?
document.getElementById("chb_vIsDefect").selected = true;

document.getElementById("lbl_vValue").innerText = "true";
}

// Code Behind
chb_vIsDefect.Attributes["onClick"] = "JSGeneratePackageID()";
Thx,
Julius F
Nov 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.