Real Estate Forums
| Coding HTML, ASP, PHP, JAVA MYSQL and more. All coding questions should be asked here. |
![]() |
|
|
Thread Tools | Display Modes |
|
|||
|
Does anyone know if an image can be made to function as the input in an onclick action instead of a button?
Here is the code. As it is now, the onclick button works and that is almost ok. It would be nice if the same action could be applied to clicking on the image <table border="1" cellpadding="0" cellspacing="0" summary=""> <tr><td valign="top"> <FORM action="http://bungeebones.com/spider/search.php" method="get"> <img src="/images/searchgl.jpg"></td></tr><tr><td align="center"><INPUT align="center" type="button" value="Search" onClick="window.open('http://bungeebones.com/spider/search.php/',' mywindow','width=380,height=380,toolbar=no,locatio n=no,directories=no, status=no,menubar=no,scrollbars=yes,copyhistory=no ,resizable=no')"> </td></tr> </FORM> </p></td></tr> </table> Last edited by RESynergy; 02-26-2007 at 10:46 PM. |
|
||||
|
I expect it would work fine, but why not just try it?
|
|
|||
|
Hey Fergus,
Yeah, that code works and puts this out ![]() It's not a big deal, but I would like to get the picture to act like the button does. I guess I wasn't to clear with my post. Sorry about that. |
|
|||
|
Try changing it to this:
Code:
<FORM action="http://bungeebones.com/spider/search.php" method="get">
<INPUT type="image" src="/images/searchgl.jpg" onClick="window.open('http://bungeebones.com/spider/search.php/','mywindow','width=380,height=380,toolbar=no,loca tion=no,directories=no,status=no,menubar=no,scroll bars=yes,copyhistory=no,resizable=no')">
</FORM>
|
|
|||
|
Thanks PLS,
Using the picture ended up causing different results than what I needed. The tricky thing here is that the parent pages data is in an Iframe, loading from a different site also. Everything needs to refresh to itself to preserve the parameters in the script. What a mess lol, but it works. I needed to open the child page without closing the parent page and the form and button does this. It opens a pop up and leaves the parent still open. I haven't been able to stop the picture from opening a new parent window. It acts really strange though as it opens both the new parent and a pop up window. This could be a neet effect if we could figure out something to use it for :-). If there was some way to have each window load with different data than each other, this would have an effect like opening two windows at the same time. There's probably easier ways though. I'll let it rest like it is. I don't think there is an easy way to get a pic to act like a button but if someone thinks of something I'll be glad to give it a try. I appeciate your help though. Last edited by RESynergy; 02-26-2007 at 11:10 PM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|