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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T12:21:29+00:00 2026-06-16T12:21:29+00:00

How it works I have a page called displayRecord.php which is loaded inside a

  • 0

How it works

  1. I have a page called displayRecord.php which is loaded inside a
    JQuery dialog box. The dialog box is created inside editTicket.php

  2. Basically the displayRecord.php allows a user to add a username &
    ref id and via AJAX $.post it updates the DB and retrieves the
    number of record in the respective table.

  3. The retrieve counter step is also meant to occur on page load so
    that not only is it displayed when the user adds the username &
    password but when the page loads for the first time.

What’s failing to work

Step 3 above fails when the displayRecord.php page is inside the JQuery dialog (or atleast thats what I’ve discovered). If I go to the URL it displays the counter on load. Step 2 still works inside the dialog.

JQuery dialog box call from editTicket.php:

<script type="text/javascript">

var dlg = '';
$(document).ready(function() { 

     dlg=$('#ticketDetails').dialog({
        title: 'TICKET DETAILS',
        resizable: false,
        autoOpen:false,
        modal: true,
        show:'fade',
        hide: 'fade',
        buttons:{ "Close": function() { dlg.dialog("close"); } },
        close: function(e, i) { dlg.hide(); },
        width: 1300   
     });


    $('a.view').click(

        function(e) 
            {    
                dlg.load('displayRecord.php?id='+this.id, function(){ 
                dlg.dialog('open');

            });

        });
});

calling the showCount function on load in displayRecord.php:

<?php if (@$data['escalate'] == "No"){ ?>
        <body onLoad="showCount()">
<?php } else{ ?>
        <body>
    <?php } ?>

showCount function:

function showCount(){

    var ticket_id = <?php echo $data['id']; ?>

    $.post('escalationCount.php',{post_ticket_id:ticket_id}, 
    function(data) {
    $('#escalationCount').html(data);
    });
}

As state before the on page load function doesn’t appear to be firing inside the JQuery dialog box.

I’m struggling at this point to identify the source of the problem. Some help please, 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-06-16T12:21:31+00:00Added an answer on June 16, 2026 at 12:21 pm

    If I understand you correctly (and I’m not sure I do):

    $('a.view').click(
    
        function(e) 
            {    
                dlg.load('displayRecord.php?id='+this.id, function(){ 
                    <?php if (@$data['escalate'] == "No") { echo 'showCount();' } ?>
                    dlg.dialog('open');
    
            });
    
        });
    

    This will update the counter when the dialog is opened.

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

Sidebar

Related Questions

I have the following jQuery code: $(body.page-calendar-practices-2012-05 #content-header h1#title) which works fine. I can
I have the code below which links to a page called deletepage.php which is
I have a page called index.php which includes a page new_display.php which again includes
I have an html page called search.html which contains sliders, they work perfectly in
I have a page based web method which works fine, using [WebMethod], i.e [WebMethod]
I have a javascript page which checks an email and username, this works fine
I have created a registration page using CI that works fine. However, I encoded
I have an infinite scroller for a product page which works well. For SEO
I have the following query which works: SELECT ?page ?lat ?long (bif:st_distance(?geo, bif:st_point(42.883, -72.8981)))
I have a jQuery scrollbar in a static html page. The code works fine

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.