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 6737101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:12:32+00:00 2026-05-26T11:12:32+00:00

I have this click listener and for some reason it’s not triggering in IE8

  • 0

I have this click listener and for some reason it’s not triggering in IE8 or Firefox:

console.log("listener attached");

jQuery(".ui-button-text").click(function() {

        console.log("this should have triggered");

        var ajaxUrl = '/ajax.php?popup=true';

        var dataString = "param="+param+"&param2="+param2;

        // contruct the ajax request
        jQuery.ajax({
            url: ajaxUrl, 
            dataType: 'json', 
            data: dataString, 
            beforeSend: function() {
                jQuery(".ui-button-text").html("Saving...");
            },
            complete: function() {
                jQuery(".ui-dialog-content").dialog("close");
            },
            success:function(response){

            } 
        });   

    });

So I can see the “listener attached” in the console, but I don’t see the click trigger, this works in chrome, what am I doing wrong here?

Thanks!

UPDATE: I have tried using live(“click”, function()… instead but it’s not triggering

UPDATE: So another Update, I should mention that the content of this dialog is acquired through a separate page. It’s loaded with AJAX, this dynamically loaded content contains this click listener.

UPDATE: Here is the code that loads the content, please be aware I didn’t actually write this piece of code, so I don’t fully understand why its done the way it’s done here:

        <!-- START OF NEW WINDOW POPUP -->
        jQuery('.option_window').click(function(){
            var url = jQuery(this).attr('href');
            var title = jQuery(this).attr('title');
            jQuery('<div />').dialog(
            {
                autoOpen: false,
                width: 720,
                title: "Manage Code",
                modal: true,
                buttons:{ 
                    "Save and Return":function() {
                        var self = this;

                        var popupForm = jQuery("form.submit_on_close");
                        //if( jQuery("form.submit_on_close").attr('action') != '#' || jQuery("form.submit_on_close").attr('action') != '') {
                        if(popupForm.attr('action') != '#' || popupForm.attr('action') != '') {
                            jQuery.ajax({
                                  url: jQuery("form.submit_on_close").attr('action'),
                                  dataType: 'json',
                                  data: jQuery("form.submit_on_close").serialize(),
                                  success: function(data) {     
                                        data = eval(data);
                                        if(data.resp == "success") { 
                                            var obj = jQuery('#repl_activation_row');
                                            obj.unbind('mouseover');
                                            if( data.property_code > 0) {
                                                if( obj.hasClass('codeoff') ) {
                                                    obj.removeClass('codeoff').addClass('codeon');
                                                }
                                            } else {

                                                if( obj.hasClass('codeon') ) {
                                                    obj.removeClass('codeon').addClass('codeoff');
                                                }

                                            }
                                        }
                                        jQuery(self).dialog('close');
                                    }
                                });
                        }
                        else 
                            jQuery(self).dialog('close');
                    }
                },
                //title:title,
                open: function(event, ui){ 

                    jQuery(".ui-dialog").delay(600).queue(function(n) {
                        var topPos = jQuery(".ui-dialog").offset().top;
                        var finalPos = topPos - (jQuery(".ui-dialog").height() / 3);
                        jQuery(".ui-dialog").css("top", finalPos);
                    n();
                    });



                    var self = this; 
                    jQuery.getJSON(url, {}, function(data){ 
                        jQuery(self).html(data); 
                    });
                },
                close: function(event, ui){ jQuery(this).dialog( "destroy" ); jQuery(this).remove(); }
            }).dialog('open'); 
            return false;
        })
        <!-- END OF NEW WINDOW POPUP -->

And here is the link:

<a href="/popupmanager.php?code=3212&client=4432" class="actions option_window menulink">Manage</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-05-26T11:12:32+00:00Added an answer on May 26, 2026 at 11:12 am

    Your error is caused by a wrong implementation/assumption of the jQuery UI button() method. The relevant code is shown and explained below (see the bottom of the answer for a fix):

    HTML:        <button id="save">Save and Return</button>
    
    JavaScript:  $("#save").button();
    

    The output of this code is as follows:

    <button id="save" class="ui-button ... ui-button-text-only" role="button" ..>
        <span class="ui-button-text">Click me</span>
    </button>
    

    As you can see, the element with class .ui-button-text is a child of a <button> element.
    Now, have a look at this fiddle. In almost every browser, the fiddle shows that no event ever triggers at childs of the <button> element.

    Fixing your code

    To fix your code, replace jQuery(".ui-button-text").click(function() { by either of the following:

    jQuery(".ui-button").click(function() {               // Recommended
    jQuery(".ui-button-text").parent().click(function(){  // Alternative method
    

    Check this comparison of the methods (fiddle), and you will see that the error is caused by your wrong implementation/assumption of the jQuery UI plugin.

    Links:

    • Fiddle: Testing event listeners In most browsers, this fiddle show that event listeners of the button’s child element are not triggered.
    • Fiddle: Solution – The comparison of your code, and the patched code
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a listener like this: $('.delete').click(function() { ...some stuff }); Also, on the
Code is not running on .click when I have this: $(.cancel).click(function() { alert(got here);
i have this jquery code $(#eioShowLink).on('click',function(){ $(#ioEditRelatedConcepts).html(''); $.getJSON(http://localhost/Mar7ba/Ontology/getRelatedConceptsAndRelations/+conceptName+/TRUE, function(data){ var concepts = data[0]; var
I have this code in jquery : $(#order_btn).click(function(){ var totalprice = $(.price_amount).text(); $(#totalprice).val(totalprice); });
Currently i have this: $(.splitCol).click(function () { $.cookie('whichColumn', 'split'); $(.threeCol .active).removeClass(active); $(.leftCol .active).removeClass(active); $(.splitCol
I have this code $(.delete2).click(function() { $('#load2').fadeIn(); } I have dynamically added item via
I have this (simplification): $(li).click(function{alert(test);}); <li> <input> </li> What's the best way to bind
i have this form to serialize once i click the submit button, <form class=cashier_forms
I have this working query that outputs URL and click counts from database. <?php
I have this code: $('.user_info').click(function(){ var pos = $(this).offset(); rel_value = $(this).attr('rel'); $('#' +

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.