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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:48:39+00:00 2026-05-12T20:48:39+00:00

I have a little page I’ve been working on. It’s at: http://nait.jtlnet.com/~fpkj5v0r/programmer.php – and

  • 0

I have a little page I’ve been working on. It’s at: http://nait.jtlnet.com/~fpkj5v0r/programmer.php – and as you can see, a jquery chart shows up, like it’s supposed to.

Now here’s the problem.. which has ended up taking up 6+ hours of my time… when I click a link (which uses ajax to load up a new page in the same div), and then I try to go back to the chart by clicking the correct link, nothing loads up.

  • The steps to see this take place is. Load up page and see the chart.
  • Then go under the “Water Plant” heading and click “test”. This will load up a new page into the div.
  • Now, click on the link, “View Stats”. This will load back up the exact same page that contains the chart.. except no chart show up. The jquery doesn’t seem to work here. I’ve heard about jquery having an AJAX problem, since it’s only a div loading up and not the whole page, but I’ve never had any luck with the .live() jquery stuff.

Please, any help would be appreciated. I’ve tried different charts, all using jquery, thinking my jquery was just messed up, but it seems to be something else.

I can post the code.. but it’s just your regular jquery code in the header, and div opening in the corresponding page.

Thanks!

Marcus

  • 1 1 Answer
  • 1 View
  • 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-12T20:48:40+00:00Added an answer on May 12, 2026 at 8:48 pm

    Ok, so you return the placeholder div from ajax.

    The problem I’m seeing now is that there’s nothing telling javascript to write in the graph.

    My suggestion is to take your current document.ready and change it:

    CURRENTLY:

    $(document).ready(function() {
      // stuff that happens
    });
    

    TRY CHANGING TO:

    function documentOnReady() {
    
    var json =  
    [ 
        {"dates":"24 feb","visitors":"5"}, 
        {"dates":"25 feb","visitors":"21"}, 
        {"dates":"26 feb","visitors":"14"}, 
        {"dates":"27 feb","visitors":"45"}, 
        {"dates":"28 feb","visitors":"20"}, 
        {"dates":"29 feb","visitors":"18"}, 
        {"dates":"01 mar","visitors":"9"}, 
        {"dates":"02 mar","visitors":"7"}, 
        {"dates":"03 mar","visitors":"42"}, 
        {"dates":"04 mar","visitors":"17"}, 
        {"dates":"05 mar","visitors":"15"}, 
        {"dates":"06 mar","visitors":"9"}, 
        {"dates":"07 mar","visitors":"15"}, 
        {"dates":"08 mar","visitors":"3"}, 
        {"dates":"09 mar","visitors":"3"}, 
        {"dates":"10 mar","visitors":"19"}, 
        {"dates":"11 mar","visitors":"15"}, 
        {"dates":"12 mar","visitors":"11"} 
    ] ;
    
        var plot_data = new Array(); 
        var plot_ticks = new Array(); 
    
        for (var i in json) { 
            i = parseInt(i); 
            plot_data.push([i, json[i].visitors]); 
            plot_ticks.push([i+0.5, json[i].dates]); 
        } 
    
        $.plot($("#placeholder"),  
             [ 
                {"data": [[0, 0]]},  
                {"data": [[0, 0]]},  
                {"data": [[0, 0]]},  
                {"data": [[0, 0]]},  
                {"data": [[0, 0]]},  
                 { 
                     label: "Last 20 days visits", 
                     bars: {"show": "true"}, 
                     data: plot_data 
                 } 
             ], 
            { 
                 xaxis: { 
                   ticks: plot_ticks 
                } 
             } 
         ); 
    }
    $(document).ready(documentOnReady);
    

    THEN in the callback of the ajax, you need to call documentOnReady() again to re-run the graph rendering code.

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

Sidebar

Related Questions

I have a little tool on a web page that can be clicked and
On this page there is a list of footer links that have a little
I have a page which contains a jQuery-UI horizontal slider, created using a little
I have a little Templating class, that keeps all settings inside the php class.
I have a little problem with an AJAX function: PAGE A stands for the
I have this little foreach statement in an ASPX page: <% foreach(string path in
i have a little problem here , this page at firefox, opera, chrome, has
I have a little problem with jquery mobile. always my page is called this
I have a little contact-page on my asp.net page. I have ~5 validators that
I have a little button on my page that should load a google map.

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.