Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

AJAX Refresh

Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

After I click the menu id and go into the statistics linkage, the whole page cannot refresh well. So, I go back and click the statistics linkage again. The page can show all.

Why the statistics page cannot show well?

I pass 3 arrays and width length to a javascript function. Actually, I would think they do the same.

function drawGraph(g1,g2,g3,gwidth){

// Graph for main dishes
var total=0;
var calpercentage =0;
var calwidth=0;
var output="";

for (i=0;i<g1.length;i++){
output = '<a href=restaurant.jsp>Main Page</a>'
output += '<h2>Main Dishes</h2>'
output +='<table border="0" cellspacing="0" cellpadding="0">'
for (i=0;i<g1.length;i++){
output+='<tr><td>'+g1[i][0]+' </td><td><img src="'+graphimage+'" width="'+calwidth+'" height="10"> '+calpercentage+'%</td></tr>'
document.write(output+'<br>Total participants: <b>'+total+'</b><p></p>')

... same as g2 and g3
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic