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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:05:48+00:00 2026-05-26T05:05:48+00:00

I have the following function which works fine when tied to an onClick() event..

  • 0

I have the following function which works fine when tied to an onClick() event.. However if the event is fired onReady() it fails to do it job.. Adding an alert() at any point in the method allows it to work fine.. So I know it’s related to an Asynchronous AJAX request. I just haven’t had any luck successfully adding deferred or callback logic.. not sure how to approach it.

Does a simple way exist to improve the method? I’m ultimately calling this method onOpen() for a jQueryUI Dialog.. But the dialog fires and is empty..

function performElqLookups(formName) {
    var elqTracker = new jQuery.elq(459);
    //first do the visitor lookup
    var visitorLookup = 'ba109a0a75294aed95ca72b0bc3b345d';
    elqTracker.getData({ key: visitorLookup, lookup: "", success: function() {
        //then check for an email address on the visitor record and do a contact data lookup if there is one
        if (typeof GetElqContentPersonalizationValue == "function") {
            var email = GetElqContentPersonalizationValue("V_ElqEmailAddress");
                if (email != "") {
                    var contactLookup = 'c7e9dd7150464162af6fe1cf471627e5';
                    elqTracker.getData({ key: contactLookup, lookup: "<C_EmailAddress>" + email + "</C_EmailAddress>", success: function() {
                        populateForm(formName);
                        trackPage().done(function( guid ) {
                            $('#elqCustomerGUID').val(guid);
                        });
                    }});
                }
        }
    }});
}
  • 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-26T05:05:48+00:00Added an answer on May 26, 2026 at 5:05 am

    you can set Ajax to synchronous by passing async:false to any ajax calls such as get() load() and ajax()

    also, remember that you should always wrap your code with $(function(){..code in here..}) because this is shorthand for document.onReady

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

Sidebar

Related Questions

I have the following function, which works fine in Firefox, but will do nothing
I have the following jQuery code which all works fine: $(#sidebar .m3, #sidebar .m5).toggle(function()
Hi have the following function which works fine: jQuery('.btnRemoveItem').click(function(obj){ jQuery(this).closest('li').fadeOut(400, function() { $(this).remove(); });
I have the following code, which works fine in FF, but the .append() function
I have the following controller which works fine: function Controller() {} Controller.prototype = {
I have the following code which works fine, however I wanted to know if
I have the following jQuery code, which works fine: $(document).ready(function () { $('#link1').click(function ()
I have the following jquery code which works fine. $('#onlyTwo').click(function() { $(#textarea3).attr(disabled, true); $(#textarea4).attr(disabled,
I have a following code which works fine MsgBox(AddSomething(Of String)(Hello, World)) Public Function AddSomething(Of
I have the following regex pattern which works fine: #^(.+?)=(.+?)$#D However I want to

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.