Sign in to follow this  
OzPac

using hyperlink variable passing

Recommended Posts

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

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this