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
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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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">

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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