Real Estate Forums

Coding HTML, ASP, PHP, JAVA MYSQL and more. All coding questions should be asked here.

Reply
 
Thread Tools Display Modes
Old 02-26-2007, 05:14 PM
RESynergy RESynergy is offline
Real Estate WebMaster
 
Join Date: Nov 2006
Posts: 109
RESynergy is on a distinguished road
Default image based "on click" action??

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.
Reply With Quote
Old 02-26-2007, 07:01 PM
REW Fergus's Avatar
REW Fergus REW Fergus is offline
Real Estate Webmasters Staff
 
Join Date: Aug 2006
Location: Nanaimo, BC
Posts: 588
REW Fergus is on a distinguished road
Default Re: image based "on click" action??

I expect it would work fine, but why not just try it?
__________________
Fergus Gibson
realestatewebmasters.com
Reply With Quote
Old 02-26-2007, 08:10 PM
RESynergy RESynergy is offline
Real Estate WebMaster
 
Join Date: Nov 2006
Posts: 109
RESynergy is on a distinguished road
Default Re: image based "on click" action??

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.
Reply With Quote
Old 02-26-2007, 09:11 PM
PLS PLS is offline
Advancing Webmaster
 
Join Date: Jul 2006
Posts: 36
PLS is on a distinguished road
Default Re: image based "on click" action??

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>
This also seems to load the search in the parent page, but perhaps someone clever here can solve that part of things.
Reply With Quote
Old 02-26-2007, 11:05 PM
RESynergy RESynergy is offline
Real Estate WebMaster
 
Join Date: Nov 2006
Posts: 109
RESynergy is on a distinguished road
Default Re: image based "on click" action??

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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



For our members

Main Sections

IDX Coverage Areas

Spiders Welcome

All times are GMT -7. The time now is 06:53 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.