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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:45:21+00:00 2026-05-23T18:45:21+00:00

I have in my Document Ready: $(document).ready(function () { showAll(); var av= $(‘#a’).attr(‘value’); alert(av);

  • 0

I have in my Document Ready:

$(document).ready(function () {       
    showAll();
    var av= $('#a').attr('value');
alert(av);                              <-----**Debugging Value**
    if(av == 1) { 
         alert("1")  
     } else {
         alert("0")
     }
 });

The function showAll() calls a PHP and directly generates hidden inputs.

<input type='hidden' value='///automatically generated 1 or 0///'>

My probelm right now is when I alert av at the Debugging Value, it is undefined. And I know this is because that section is not live. How can I make that section live automatically.
If i used live(‘click’, etc etc….) then that works, but I am trying to make it load based on the conditional.

Thanks for your help.

EDIT:///

My showProf looks like this:

xmlhttp.onreadystatechange=function()         {
      if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
        document.getElementById("id_verified").innerHTML=xmlhttp.responseText;
        }
      }

xmlhttp.open("GET","showProf.php?i="+myi+"&t=" + Math.random(),true);
xmlhttp.send();
  • 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-23T18:45:22+00:00Added an answer on May 23, 2026 at 6:45 pm

    You can do a callback from your ajax call like

    $.ajax({
      url: 'ajax/test.html',
      success: function(data) {
        $('.result').html(data);
        alert('Load was performed.');
      }
    });
    

    From http://api.jquery.com/jQuery.ajax/

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

Sidebar

Related Questions

Let's say I have this $(document).ready(function() { var array = $.makeArray($('p')); $(array).appendTo(document.body); }); });
I have the following: $(document).ready(function() { var myIframe = document.getElementById('myIframe'); var element = myIframe.contentDocument.createElement('script');
I have the following code: $(document).ready(function() { var id = 'cbx'; var idPrefix =
In background.html of my chrome extension I have: $(document).ready(function(){ var some_variable = some_variable; function
I have this jQuery: $(document).ready(function() { $(#panel).hide(); $('.login').toggle( function() { $('#panel').animate({ height: 150, padding:20px
$(document).ready(function(){ $(a[href*='http://']:not([href*='+location.hostname+'])).attr(target,_blank); $(a[target!='_blank'][target!='_top']).click(function(){ $(#actualcontent).load($(this).attr(href)); window.location.hash=$(this).attr(href); return false; }); }); So I have this code
Under $(document).ready(function() , I have the following code: num = $(#mainContentCategoryLinksWrapper > div).size(); This
I have the following jQuery: $(document).ready(function () { $(.element).draggable(); $(.element).droppable({ drop: function () {
I have seen people writing $(document).ready(function(){ }); and some writing $(function() { }); What's
I have the following code $(document).ready(function() { $('a#slick-toggle').click(function() { $('#slickbox0').toggle(400); return false; }); });

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.