Jump to content

Rollover submit button doesn;t show up in firefox...


Kane250

Recommended Posts

I have a rollover image being used as a submit button that also opens a popup window. It works fine in Safari and Opera but not in Firefox. In firefox it just shows up as a big square...any idea why this would be happening?

 

<html>

<!--
function wopen(url, name, w, h)
{
// Fudge factors for window decoration space.
// In my tests these work well on all platforms & browsers.
w += 20;
h += -20;
var win = window.open(url,
  name,
  'width=' + w + ', height=' + h + ', ' +
  'location=no, menubar=no, ' +
  'status=no, toolbar=no, scrollbars=no, resizable=no');
win.resizeTo(w, h);
win.focus();
}
// -->

<div id="emailcheck">
    <input type="submit" value="" class="button" onclick="wopen('mainsub.php', 'popup', 400, 375); return true;" onmouseover="this.className='button-over';" onmouseout="this.className='button';" />
</div>
</html>

Link to comment
Share on other sites

Why use javascript to change the submit button, if you can do the same thing in CSS?

 

I know :hover isn't supported on all browsers, like IE6, but about 70% of them do support it.

 

Because the submit triggers a javascript popup. So I couldn't see a way to code a standard rollover that also connected with a popup window..

Link to comment
Share on other sites

Use CSS to do the hover, use javascript to do the popup.

 

I am. This is my CSS:

.button {
border:0px;
outline:0px;
background:url('images/emailcheck.png');
width: 41px;
height: 33px;
}
.button-over {
border:0px;
outline:0px;
background:url('images/emailcheckro.png');
width: 41px;
height: 33px;
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.