Weird Behavior

Discussion in 'ASP .Net' started by Joey, May 23, 2007.

  1. Joey

    Joey Guest

    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
    Joey, May 23, 2007
    #1
    1. Advertising

  2. Joey

    bruce barker Guest

    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)



    Joey wrote:
    > 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
    >
    bruce barker, May 23, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dorayme
    Replies:
    1
    Views:
    613
    richard
    Jan 21, 2011
  2. richard
    Replies:
    0
    Views:
    578
    richard
    Jan 21, 2011
  3. richard
    Replies:
    0
    Views:
    613
    richard
    Jan 21, 2011
  4. Beauregard T. Shagnasty

    Re: A Weird Appearance for a Weird Site

    Beauregard T. Shagnasty, Jan 21, 2011, in forum: HTML
    Replies:
    1
    Views:
    435
    Captain Paralytic
    Jan 21, 2011
  5. David Segall
    Replies:
    0
    Views:
    628
    David Segall
    Jan 22, 2011
Loading...

Share This Page