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

The below HTML/CSS/Javascript (jQuery) code displays the #makes select box. Selecting an option displays
Say I have jquery code like this: html += '<div class=index>' + item.index +
I have this jQuery code that queries an API on a keyup event (via
I'm making table rows click-able with jQuery's $.live() function. Works perfectly on Chrome, Firefox
The below code is very simple. I have a jQuery autocomplete bound to an
i have the following jquery code. basically i will have several overlapped divs and
I have the following JQuery code that worked perfect in C#/Asp.net 2.0 to call
I have some jQuery code. I have called an Ajax function file, file.php, that
I have written jQuery code, in files Main.html and ajax.php . The ajax.php file
I have the following JQuery code which does similar functionality like Stackoverflow where the

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.