there are 4 textboxes on my web site. when a mouse over an image script runs according to the values of the textboxes. (what i want to be)
here is the texboxes.
maxx<input id="maxx" name="maxx" type="text" runat=server /><br />
maxy<input id="maxy" name="maxy" type="text" runat=server />
in order to use them with asp.net i added runat=sever. my script should get the values from several textbox like that and calculate the valuse. my script
function show(e) {
var x=0
var y=0
x=-(-document.form1.minx.value)+((event.offsetX)*(document.form1('ratioX').value))
y=-(-document.form1.maxy.value)+(-(event.offsety)*(document.form1('ratioY').value))
window.status=x + " " + y
document.onmousemove=show;
return true;
}
however, i guess the values from textboxes are coming as text instead of number so it is not calculating the values as number. at the begginning i was having comma problem with the decimal values i replaced the commas with point.
what should i do to get the values as number?
here is the texboxes.
maxx<input id="maxx" name="maxx" type="text" runat=server /><br />
maxy<input id="maxy" name="maxy" type="text" runat=server />
in order to use them with asp.net i added runat=sever. my script should get the values from several textbox like that and calculate the valuse. my script
function show(e) {
var x=0
var y=0
x=-(-document.form1.minx.value)+((event.offsetX)*(document.form1('ratioX').value))
y=-(-document.form1.maxy.value)+(-(event.offsety)*(document.form1('ratioY').value))
window.status=x + " " + y
document.onmousemove=show;
return true;
}
however, i guess the values from textboxes are coming as text instead of number so it is not calculating the values as number. at the begginning i was having comma problem with the decimal values i replaced the commas with point.
what should i do to get the values as number?