Kane250 Posted June 24, 2008 Share Posted June 24, 2008 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 https://forums.phpfreaks.com/topic/111634-solved-how-do-i-combine-these/ Share on other sites More sharing options...
gijew Posted June 24, 2008 Share Posted June 24, 2008 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 https://forums.phpfreaks.com/topic/111634-solved-how-do-i-combine-these/#findComment-573055 Share on other sites More sharing options...
Kane250 Posted June 24, 2008 Author Share Posted June 24, 2008 Oh that worked great, thanks! Link to comment https://forums.phpfreaks.com/topic/111634-solved-how-do-i-combine-these/#findComment-573067 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.