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>

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..

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;
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.