Jump to content

[SOLVED] How do I combine these?


Kane250

Recommended Posts

I was using a standard submit button that submitted information to a popup window, however I wanted to replace the button with a rollover image instead. The first code is the original code for the rollover, and the second is the code for the standard submit button. How do I combine these so that the rollover image submits the same way?

 

Thanks!

 

<a href="vcon.php"><img src="images/emailcheck.png" onmouseover="this.src='images/emailcheckro.png'" onmouseout="this.src='images/emailcheck.png'" /></a>

<input type='text' value="" name="email" /><br />
<input type='submit' onclick="wopen('mainsub.php', 'popup', 400, 375); return true;" value="Sign Me Up!"/><br />

Link to comment
Share on other sites

I'll give you what I use. First, if your custom button is 25px in height and 100px in width you should make your graphic 50px height, 100px width and put what you want the rollover to be on the bottom part. You can always add the onclick="function();" in there too. I'm just tired and spent way to much time on here tonight :)

 

// html
<input type="submit" value="submit" class="button" onmouseover="this.className='button-over';" onmouseout="this.className='button';" />

// css
.button {
  border:0px;
  outline:0px;
  background:url('graphic.png') no-repeat 0px 0px;
  width: 100px;
  height: 25px;
}

.button-over {
  border:0px;
  outline:0px;
  background:url('graphic.png') no-repeat 0px -25px;
  width: 100px;
  height: 25px;
}

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.