Hello,
I am new to JavaScript and I am trying something I think should be simple.
I am using VS 2005. I have 2 check boxes one is a VB checkbox and the other is an html checkbox. I get if it is checked or not from a data grid. I can set the VB checkbox to checked or unchecked but not the HTML checkbox. I can’t figure out how to set the HTML checkbox. Here is what I have tried and I am sure I am not even close:
Works for VB checkbox:
chkbUseCompanyAddress.Checked = cgfDataGridGetBoolean(dgrdResults.SelectedItem.Cells(c_IsDefaultAccess).Text)
I use the below to send the VB’s checkbox status to javascript to then set the javascript checkbox. ( they never get into them as I am sure you know)
Does not work:
chkbUseCompanyAddress.Attributes(“onchange”) = “javascript: ChangeDefaultAddressCheckbox(‘” + chkbUseCompanyAddress.ClientID + “‘);”
Another attempt that does not work:
chkbUseCompanyAddress.Attributes(“onFocusOut”) = “javascript: ChangeDefaultAddressCheckbox(‘” + chkbUseCompanyAddress.ClientID + “‘);”
All I need is to set the HTML checkbox to equal the same as the standard control. I have a JavaScript function that will work I just don’t know how to call it since the above does not work. I am sure there must be an easier way.
Thanks hope it kind of makes sence