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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:09:27+00:00 2026-05-26T02:09:27+00:00

If I use an alert to stop the code running the ddl ‘Suburb1′ is

  • 0

If I use an alert to stop the code running the ddl ‘Suburb1′ is populated with the correct value if I use ‘delay’ the value is not set. I need some way of stopping the code running after ‘change’ so that $(‘#Suburb1’).val(SuburbVC); is not fired straight away when the ddl Suburb1 is getting populated from the DB.

if ($(this).attr("checked") == true) {
var PostCode = $('#PostCode').val();
var SuburbVC = $('#SuburbVC').val();

    $('#PostCode1').val(PostCode);  

    // Another function is called which populates Dropdown list from DB
    // If I use delay Suburb1 is not populated
    $('#PostCode1').change().delay(5000);  

    //If I use an alert Suburb1 is populated 
    // alert('delay');
    $('#Suburb1').val(SuburbVC);
  } else {
    $('#PostCode1').val("");
}

Thanks

  • 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-26T02:09:27+00:00Added an answer on May 26, 2026 at 2:09 am

    You are tackling this problem the wrong way; You should add a callback function to execute the rest of the code, after you populate the values from the DB.

    How do you populate the values from the DB? AJAX? If so, add a function call with the code you want to execute after the data is ready, to the success handler.

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

Sidebar

Related Questions

sometimes i use debug code to alert something in javascript (for example, matching something
Typically if we just use alert(object); it will show as [object Object] . How
Mobile browsers. Jquery dialog alert box. I don't want to use alert() because it
Typical jQuery over-use: $('button').click(function() { alert('Button clicked: ' + $(this).attr('id')); }); Which can be
I want to use WatiN to verify the error message in a JavaScript alert
I use an uiwebview into my iphone app. When i display a javascript alert
I use the following javascript function, function get_check_value(formId,checkboxId,TxtboxId) { alert(formId); var c_value = ;
I use an externel javascript file and i have this, function getdropdownvalue() { alert($(#<%=DLState.ClientID%>));
i use this javascript syntax for validating a checkbox... alert(document.getElementById(ctl00_ContentPlaceHolder1_Chkreg).checked); if (document.getElementById(ctl00_ContentPlaceHolder1_Chkreg).checked == false)
I'm trying to use this line to detect browser type: IE or Firefox. alert(isBrowser(Microsoft));

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.