Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 872873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:50:58+00:00 2026-05-15T10:50:58+00:00

The Jquery code below works ok with firefox, Safari, Opera but not with IE.

  • 0

The Jquery code below works ok with firefox, Safari, Opera but not with IE. I kinda know why this isn’t working in IE after reading a lot about it but I do not know how to fix it.
My understanding (I think) is that this method will assign a attribute of “onclick” in IE rather than an event method. Therefore it will not fire in IE and the href fires instead which in this case is “#” which is exactly what is happening. What is the correct way of adding the onclick event. There is more javascript code below the code shown but I do not think it’s relevant to the question.

<a id="product_photo_zoom_url" href="/PhotoGallery.asp?ProductCode=9857%2D116%2D003"  
title="9857-116-003 Ignition box"><img id="product_photo" 
src="/v/vspfiles/photos/9857-116-003-2T.jpg" border="0"
alt="9857-116-003 Ignition box" /></a> <br /><a id="product_photo_zoom_url2"  href="/PhotoGallery.asp?ProductCode=9857%2D116%2D003"
title="9857-116-003 Ignition box">
<img src="/v/vspfiles/templates/100/images/buttons/btn_largerphoto.gif" border="0"></a>





var global_URL_Encode_Current_ProductCode;
var global_Config_ProductPhotosFolder;
var global_Current_ProductCode;

var titleattr = $("a#product_photo_zoom_url").attr("title"); 
var picurl='tb_show(titleattr, \'/PhotoDetails.asp?ShowDESC=N&ProductCode=\' + global_URL_Encode_Current_ProductCode + \'&TB_iframe=true&height=600&width=520\');return false;'

$("a#product_photo_zoom_url").attr('onclick', picurl);
$("a#product_photo_zoom_url").attr('href', '#');

$("a#product_photo_zoom_url2").attr('onclick', picurl);
$("a#product_photo_zoom_url2").attr('href', '#');
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T10:50:59+00:00Added an answer on May 15, 2026 at 10:50 am
    function picurl()
    {
      tb_show(titleattr, '/PhotoDetails.asp?ShowDESC=N&ProductCode=' 
     + global_URL_Encode_Current_ProductCode 
     + '&TB_iframe=true&height=600&width=520');  
      return false;
    } 
    
    $("a#product_photo_zoom_url").click(picurl);
    

    You can get rid of the var picurl = .... Note that picurl is now a function, rather than a string of code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some jQuery code which works great in Firefox and Chrome, but does
The code below works fine on Firefox, Safari etc with no errors at all.
I'm seeing this issue in Internet Explorer 8, but not in Safari or Firefox.
I'm using the jQuery code below to launch an overlay div and it works
So I wrote the code below: jQuery('#contentWrapper').delegate(.addButton, click, function(){ addRow(jQuery(this)); }); function addRow(thisButton){ var
I have this javascript code below that uses jquery, it is suppoed to be
I am using below code to show jquery dialog, its working perfectly, Sub OpenDialog(ByVal
The code below is colouring the input but not submitting the form in chrome.
Code below works well on Firefox - displays progress bar which progresses on every
I got a problem with JQuery in IE. The code works perfectly in firefox.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.