TANK Posted February 8, 2008 Share Posted February 8, 2008 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 Quote Link to comment Share on other sites More sharing options...
nogray Posted February 8, 2008 Share Posted February 8, 2008 Can post the output HTML, this is the smarty code and it's not clear what's your output will look like. Just visit your page and right click anywhere empty and select "view source" Quote Link to comment Share on other sites More sharing options...
TANK Posted February 8, 2008 Author Share Posted February 8, 2008 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 Quote Link to comment Share on other sites More sharing options...
nogray Posted February 8, 2008 Share Posted February 8, 2008 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. Quote Link to comment Share on other sites More sharing options...
TANK Posted February 8, 2008 Author Share Posted February 8, 2008 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 Quote Link to comment Share on other sites More sharing options...
nogray Posted February 8, 2008 Share Posted February 8, 2008 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"> Quote Link to comment Share on other sites More sharing options...
TANK Posted February 8, 2008 Author Share Posted February 8, 2008 I tried that with the following result, 1. Firefox opened the google site in a full window 2. IE did the same thing, which is nothing but throw the "Invalid argument" error Thanks Quote Link to comment Share on other sites More sharing options...
TANK Posted February 8, 2008 Author Share Posted February 8, 2008 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.