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

  • SEARCH
  • Home
  • 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 7787849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:48:08+00:00 2026-06-01T20:48:08+00:00

I have made a jQuery/javascript that is loading a page into a div when

  • 0

I have made a jQuery/javascript that is loading a page into a div when clicking on a picture. It works for IE, Firefox, Chrome but NOT Opera.. I can’t figure out why it isn’t working..

Please take a look on this page and click on a product to see how it loads a popup window.
http://www.dev.dressmind.com

Here is the script for the click:

function qp(id) { 
    $.ajax({
        method: "get",
        url: "QuickProduct.aspx",
        data: "id=" + id,
        //beforeSend: function() { $('#main').hide('slow').fadeOut(); },
        complete: function() { 
            $('#product-area').show('200').fadeIn(); 
            $("#product-area-overlay").show();
            $(".productbox-hover").hide();
        },
        success: function(result) { 
            $('#product-area').html(result); 
        }
    }); 
}

Then I have a link that look like this:

<a href="#" id="123123" onClick="qp(123123);return false;"><div></div</a>

SO please, can someone have a quick look and help me solve this problem.

Solved it

I solved it by moving the onclick-event to the div inside the instead of having it on the link.

< a href="#" id="123123">
    < div **onClick="qp(123123);return false;"**> < /div>
< /a>
  • 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-06-01T20:48:11+00:00Added an answer on June 1, 2026 at 8:48 pm

    Beside the fact that id’s may not start with a digit as @Kanishka mentioned, you didn’t post the code as you used it.

    You are calling your function like this: onclick="qp(id)". And unlike other browsers Opera (correctly) considers id an undefined variable. The other browsers are probably guessing you actually mean the id property of the current element. You need to use onclick="qp(this.id)" instead.

    To get rid of the invalid IDs and repeating the onclick handlers, you should consider assignign the event handlers all at once. Something like this:

    <a href="#" data-product-id="123456">...</a>
    <a href="#" data-product-id="222222">...</a>
    <!-- etc. -->
    
    <script>
      jQuery("[data-product-id]").click(function() {
        qp(jQuery(this).data('product-id')); return false;
      });
    </script>
    

    BTW: What about non-Javascript users?

    One more thing: You seem to using HTML5 features, but an XHTML Doctype leading to many validation errors.

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

Sidebar

Related Questions

I have made a particle generator with Jquery it works fine but it is
I have a sliding div menu made with jQuery, but you have to click
I am a Javascript/jQuery/Prototype newcomer and I have a page that has a Prototype
I have an XML web service that javascript calls are made using jQuery. This
I have made an iframe style facebook application that uses php and javascript (jquery).
I have made a table row draggable with jQuery. It works as expected (mostly)
I have a div element which is made jquery Resizable. It has alsoResize option
I have started using jQuery and rails. I have made a simple form that
I have made the following javascript to be used in my jQuery based website.
I have a webpage made of a lot of PHP and Jquery/javascript I have

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.