Hi,
I know that an input type=image passes the x & y coordinates rather than the name & value, but I can't work out how to get these values. I've written the following (much simplified from what I really want to do!) which I call from an onSubmit trigger on the form:
function checkButton(frm, inp) {
btn = inp + ".x";
alert(frm[btn].x);
}
but the alert just shows "undefined". inp is the name of the input and frm is a reference to the form, I know this works as I can modify it to get values from text boxes etc. I've also tried frm.inp.value but it doesn't like that either. Any clues?
Thanks
I know that an input type=image passes the x & y coordinates rather than the name & value, but I can't work out how to get these values. I've written the following (much simplified from what I really want to do!) which I call from an onSubmit trigger on the form:
function checkButton(frm, inp) {
btn = inp + ".x";
alert(frm[btn].x);
}
but the alert just shows "undefined". inp is the name of the input and frm is a reference to the form, I know this works as I can modify it to get values from text boxes etc. I've also tried frm.inp.value but it doesn't like that either. Any clues?
Thanks