G
Guest
I have a webform with lots of <asp:...controls but I need couple of buttons
that doesn't cause an automatic postback. I use javascript to handle these
buttons. I tried two approaches with different results:
<IMG onmouseup="src='Bitmaps/Controls/measure_over.bmp';"
onmousedown="src='Bitmaps/Controls/measure_pressed.bmp';"
id="measure" onmouseover="src='Bitmaps/Controls/measure_over.bmp';"
style="LEFT: 170px; WIDTH: 24px; POSITION: absolute; TOP: 2px; HEIGHT: 25px"
onclick="buttonClicked(this.id);"
onmouseout="src='Bitmaps/Controls/measure_btn.bmp';"
alt="" src="Bitmaps/Controls/measure_btn.bmp">
This is working the way I want to, but I can't disable it as I can with a
button. I then replace the IMG with:
INPUT Type="image"
and it makes a postback every time I click on it. Why? A HTML control
should't do that, right? The script itself (buttonClicked) just fills a
hidden field.
/Miro
that doesn't cause an automatic postback. I use javascript to handle these
buttons. I tried two approaches with different results:
<IMG onmouseup="src='Bitmaps/Controls/measure_over.bmp';"
onmousedown="src='Bitmaps/Controls/measure_pressed.bmp';"
id="measure" onmouseover="src='Bitmaps/Controls/measure_over.bmp';"
style="LEFT: 170px; WIDTH: 24px; POSITION: absolute; TOP: 2px; HEIGHT: 25px"
onclick="buttonClicked(this.id);"
onmouseout="src='Bitmaps/Controls/measure_btn.bmp';"
alt="" src="Bitmaps/Controls/measure_btn.bmp">
This is working the way I want to, but I can't disable it as I can with a
button. I then replace the IMG with:
INPUT Type="image"
and it makes a postback every time I click on it. Why? A HTML control
should't do that, right? The script itself (buttonClicked) just fills a
hidden field.
/Miro