BeginnerNew

Members
  • Content count

    1
  • Joined

  • Last visited

About BeginnerNew

  • Rank
    Forum Newbie
  1. Hello, I am trying to Integerate Fusion charts with my Jsp. Initially, on the starting page jsp, the user enters some parametes. These parameters go to a different servlet on another remote machine which on taking these params generate some x,y values and return an xml as a response. Now, I want to generate a graph using this xml in the jsp. The problem is the dynamic nature of the url, When I try to use this piece of code, where url is the final url which will hit the remote servlet. It does not show anything in the page. <div id="chartContainer">FusionCharts will load here!</div> <script type="text/javascript"><!-- var myChart = new FusionCharts( "FusionCharts/MSLine.swf", "myChartId", "500", "500", "0", "1" ); myChart.setXMLUrl(<%=url%>); myChart.render("chartContainer"); // --> </script> But if I send a hardcoded url into the same code like in the following example, I am able to see the graph. I have made sure that the url in the above scenario is the same as the one below. <div id="chartContainer">FusionCharts will load here!</div> <script type="text/javascript"><!-- var myChart = new FusionCharts( "FusionCharts/MSLine.swf", "myChartId", "500", "500", "0", "1" ); myChart.setXMLUrl("http://localhost:8080/mainServlet/plot?serverType=offRampReg&serverName=CPG_OFFRAMP_REG_EAST_1&serverName=CPG_OFFRAMP_REG_EAST_2&serverName=CPG_OFFRAMP_REG_WEST_1&serverName=CPG_OFFRAMP_REG_WEST_2&sampleRate=30&collectD=Memory_Buffered&startTime=2012-01-14%2000:00:00&endTime=2012-01-15%2000:00:00"); myChart.render("chartContainer"); // --> </script> How can I make this thing work? Waiting for a response- Manni