using hyperlink variable passing
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



using hyperlink variable passing Expand / Collapse
Author
Message
Posted 8/3/2008 9:22:48 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/4/2008 4:58:59 AM
Posts: 2, Visits: 4
Hi, what i am trying to archive is a from in which people select their preferences to be charted from drop down menus, these choices are then sent via hyperlink (i.e. CreateData.asp?Cgame=1&Ctype=2) to, in this case a page called createdata.asp which is the asp page which renders the xml page for my graph. When accessing the xml page with the desired variables passed the xml loads correctly, however the graph is not produced siting an error "error in loading data". have i got a error in my code or is this just not possible? if ur confused then ive put my code for the 2 pages below:

The code at the graph Page:
				
Dim strDataURL
strDataURL = "Data/CreateData.asp?Cgame="& Request("Game") &"&Ctype="& Request("Type") &""
Call renderChart("FCF_Line.swf", strDataURL, "", "ChartID1", 600, 350)


Code in the createdata.asp xml rendering page:

If Request("Cgame") <> "none" then createstr = createstr + "WHERE game='" + Request("Cgame") + "'"
If Request("Cgame") <> "none" then qrycount = 1
If Request("CType") <> "none" AND qrycount = 1 Then createstr = createstr + " AND type='" + Request("Ctype") + "'"
If Request("CType") <> "none" AND qrycount = 0 Then createstr = createstr + " WHERE type='" + Request("Ctype") + "'"
If Request("Ctype") <> "none" then qrycount = 1

strQuery = "select * from Poker "& createstr &" ORDER BY Date, ID asc"


thanks, Oz
Post #7791
Posted 8/4/2008 12:01:34 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: Today @ 7:54:06 AM
Posts: 644, Visits: 1,948
Hi,
  Could you please try with encoded dataURL.

   Dim strDataURL 
   ' URL encode
   strDataURL = Server.URLEncode("Data/CreateData.asp?Cgame=" & Request("Game") & "&Ctype=" & Request("Type"))

   Call renderChart("FCF_Line.swf", strDataURL, "", "ChartID1", 600, 350)

Thanks,
Arindam

FusionCharts Team
www.fusioncharts.com

Post #7794
Posted 8/4/2008 4:59:29 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/4/2008 4:58:59 AM
Posts: 2, Visits: 4
yep that worked a treat, ta!
oz
Post #7807
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 2:29pm


Execution: 0.047.