Jump to content

[SOLVED] Works in FF but not in IE


TANK

Recommended Posts

Hello

Can anyone tell me why the following code works in Firefox browser but not in IE?

 

{if $v.image_url ne ''}<img src='{$v.image_url}'width="{$config.General.Thmb_width}" onclick="javascript:window.open('{$v.image_url}','$v.option[$ke].option_name','width={$v.W_size.image_x},height={$v.W_size.image_y},toolbar=no,status=no,scrollbars=no,resizable=no,menubar=no,location=no,direction=no');" style="cursor:pointer">{else}<img src='{$product.tmbn_url_P}'width="{$config.General.Thmb_width}" onclick="javascript:window.open('{$product.tmbn_url_P}','{$v.option[$k].option_name}','width={$product.image_x},height={$product.image_y},toolbar=no,status=no,scrollbars=no,resizable=no,menubar=no,location=no,direction=no');" style="cursor:pointer">{/if}

 

Thank you

Link to comment
https://forums.phpfreaks.com/topic/90076-solved-works-in-ff-but-not-in-ie/
Share on other sites

Hello Nogray

below is the html output

 

<td align="center"><img src='http://www.mysite.com/image.jpg'width="45" onclick="javascript:window.open('http://www.mysite.com/image.jpg','$v.option[$ke].option_name','width=210,height=210,toolbar=no,status=no,scrollbars=no,resizable=no,menubar=no,location=no,direction=no');" style="cursor:pointer"></td>

 

Thanks

Just make sure the window name is vaild "$v.option[$ke].option_name" If you don't have one, just remove it and it should work.

 

Thank you for replying. I tried removing '$v.option[$ke].option_name' from the code and the results were,

1. In firefox it opened in a whole new window (not a popup)

2. In ie it still does nothing and shows the error "Invalid argument"

 

Thanks

Can you try this and see if it works?

<img src='http://www.mysite.com/image.jpg'width="45" onclick="javascript:window.open('http://www.google.com','','width=210,height=210,toolbar=no,status=no,scrollbars=no,resizable=no,menubar=no,location=no,direction=no');" style="cursor:pointer">

Hello Nogray

I was able to get this working in IE by using.

 

onclick="javascript:window.open('{$product.tmbn_url_P}','popup','width={$product.image_x},height={$product.image_y},toolbar=no,status=no,scrollbars=no,resizable=no,menubar=no,location=no,direction=no');" style="cursor:pointer"

 

Thanks for your help.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.