Forums / Templates, Stylesheets, Page Layout / Need some help with scripting target=_blank set to exact size

Need some help with scripting target=_blank set to exact size

Locked

Views: 3,766

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
24 Sep 2006, 11:33 AM
#1
goshawk avatar

goshawk

Zen Follower

Join Date:
Aug 2006
Location:
Kihikihi, New Zealand
Posts:
220
Plugin Contributions:
2

Need some help with scripting target=_blank set to exact size

Hi,

I am trying to display a larger image in a new window that is sized to the picture.

I am trying the following code but this does not seem to resize the new window.
Is there anyone who can help?

<a href="/shop/images/large/Template/IF1039RD_Front_LRG.jpg" target="onclick="window.open(this.href,'window','width=560,height=700,resizable,scrollbars,toolbar,menubar') ;return false;""
onmouseover="window.status='Click to see larger Image'; return true;">
<img src="/shop/images/medium/template/IF1039RD_All_MED_01.jpg" width="130" height="250" border="0" alt="Front Medium Size"></a></td>

The link comes from a jpg file that has been sliced into 4

Many thanks,

Goshawk

Time is but an illusion, there is only "now"!

24 Sep 2006, 1:52 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,683
Plugin Contributions:
0

Re: Need some help with scripting target=_blank set to exact size

You could look at the way the product images are linked to the javascript popup.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

24 Sep 2006, 2:30 PM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,725
Plugin Contributions:
56

Re: Need some help with scripting target=_blank set to exact size

Yes - window.open() will give you what you want.

<script type="text/javascript"> <!-- function color_popup() { window.open("somefile.html", "", 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=396,height=1800,screenX=150,screenY=150,top=150,left=150'); } //--> </script>

<a href="javascript:color_popup()">anchor_text</a>

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

28 Sep 2006, 9:41 PM
#4
goshawk avatar

goshawk

Zen Follower

Join Date:
Aug 2006
Location:
Kihikihi, New Zealand
Posts:
220
Plugin Contributions:
2

Re: Need some help with scripting target=_blank set to exact size

Thanks guys,

Going to give this a try.

Goshawk

Time is but an illusion, there is only "now"!