B
Bob
I have a small JS function to edit "code". This function works as
intended in Firefox, but not IE 6 or Opera 9. I suppose this is an old
story, but is there a work around? I have two forms on the page,
passing one by argument, and the other "GetClass" is hard coded. I'm
trying to prevent my DB from having the same code, unless it is "ZZZ".
This function is called with an onChange event in the input field
"newcode".
function checkcode(aform) {
var code =aform.newcode.value.toUpperCase()
if (code=="ZZZ") return
newopt = aform.newclass.valueto.UpperCase() + " | " + code;
for (i=0; i<document.GetClass.key.length; i++) {
k= document.GetClass.key.options.value.indexOf(code);
if ((k>0) && (document.GetClass.key.options.value !== newopt))
alert("Warning: This Class Code is already used by " +
document.GetClass.key.options.value)
}
}
intended in Firefox, but not IE 6 or Opera 9. I suppose this is an old
story, but is there a work around? I have two forms on the page,
passing one by argument, and the other "GetClass" is hard coded. I'm
trying to prevent my DB from having the same code, unless it is "ZZZ".
This function is called with an onChange event in the input field
"newcode".
function checkcode(aform) {
var code =aform.newcode.value.toUpperCase()
if (code=="ZZZ") return
newopt = aform.newclass.valueto.UpperCase() + " | " + code;
for (i=0; i<document.GetClass.key.length; i++) {
k= document.GetClass.key.options.value.indexOf(code);
if ((k>0) && (document.GetClass.key.options.value !== newopt))
alert("Warning: This Class Code is already used by " +
document.GetClass.key.options.value)
}
}