Weird Behavior

J

Joey

asp.net 2/C#/VS2005

Using master pages

On one of my pages (content, not master) I added several image buttons
(to the aspx page) by typing in...

<asp:ImageButton id="ibtMyButton" runat="server" />

The image buttons are using CSS and skins to show a regular looking
button at first but switch to a different look as the use hovers a
mouse over them. I programmed this (to the code behind page) by typing
in...

this.ibtMyButton.Attributes.Add("onmouseover","this.src='myImage'");


So when I run my app and hover the mouse over the buttons, they change
as expected. But if I look in the status bar I can see that at the
moment I hover the mouse over any of the buttons, it places the name
of the webpage into the status bar! For this example I always see
"Register.aspx" each time I hove over one of the buttons. This is VERY
ANNOYING. These are not hyperlinks, they are link buttons (HTML input
type=image as emitted to the clients).

As a workaround I tried modifying the onmouseover event to also
include window.status='Test', but that didn't quite work. The
"Register.aspx" still shows when I touch the buttons, and "Test" shows
when I move off of them.

What is going on here? Can anyone tell me how to stop "Register.aspx"
from displaying in the status bar each time I hover over my image
buttons?

JP
 
B

bruce barker

you can't with current browsers. the tend with browsers is to show the
postback url for any control (including submit/image buttons). they also
will prevent javascript from updating the status bar.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top