Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] script no longer working with new FF
- From: list at tridemail.de (Michael Borchers)
- Subject: [Javascript] script no longer working with new FF
- Date: Tue Nov 28 02:18:12 2006
the following script worked fine for switching several checkboxes, now, i
guess since the new FF, it stopped working.
some kind of case-sensitive prob?!
<input type="checkbox" name="checkBoxSelect" id="checkBoxSelect"
onclick="javascript:checkboxSwitch(this, 'whatever');" />
function checkboxSwitch(thisCheckbox, checkboxSubstring)
{
if(thisCheckbox.checked == true)
{
var checked = true;
}
else
{
var checked = false;
}
var checkboxField = document.getElementsByTagName("input");
var checkboxFieldLength = checkboxField.length;
var SubstringLength = checkboxSubstring.length;
for(c=0;c<checkboxFieldLength;c++)
{
var attributeName = checkboxField[c].getAttribute("name");
var attributeNameLength = attributeName.length;
var SubstringStart =
parseFloat(attributeNameLength)-parseFloat(SubstringLength);
if(attributeName.substring(SubstringStart, attributeNameLength) ==
checkboxSubstring)
{
checkboxField[c].checked = checked;
}
}
}
- Prev by Date: [Javascript] Textarea - text cursor problem
- Next by Date: [Javascript] pb with httprequest and firefox
- Previous by thread: [Javascript] Textarea - text cursor problem
- Next by thread: Fw: [Javascript] script no longer working with new FF
- Index(es):