navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Why can't I do this?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Why can't I do this?
Page: [1]
 
chadb

 

Posts: 485
From: Kansas
Status: offline

 
Why can't I do this? - 1/30/2008 10:33:15   
Here is a snippit of code, I want to response.write what the output is, but it does not display anything:
While Not oRs.Eof
Set oRs2 = oConn.Execute(strQuery)
strXML = strXML & "<set name='" & ors("First") & "' value='" & ors("Middle") & "' />"
'Close recordset
Set oRs2 = Nothing
oRs.MoveNext

response.write strXML
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: Why can't I do this? - 1/30/2008 11:34:07   
Have you confirmed it's not in the source of the doc? If not in a proper XML syntax, that'll look just like a tag that a browser has no idea how to display.

Does that make sense?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to chadb)
chadb

 

Posts: 485
From: Kansas
Status: offline

 
RE: Why can't I do this? - 1/30/2008 11:36:36   
It works if I display it in a text box, so it is correct, but can I take that strXML and write it to a .xml page? I want the exact strmXML to be the code of an existing XML page? Does that make sense?

(in reply to rdouglass)
chadb

 

Posts: 485
From: Kansas
Status: offline

 
RE: Why can't I do this? - 1/30/2008 12:12:25   
rdouglass, I think you are the one who is familar with Fusionweb charts? I am trying to use them, with asp writing a variable for xml. I have confirmed my variable (stmXML) is correct, but how do I change my code:

original:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="600" height="500" id="Column3D" >
<param name="movie" value="../FusionCharts/FCF_MSArea2D.swf" />
<param name="FlashVars" value="&dataURL=Data.xml&chartWidth=600&chartHeight=500">
<param name="quality" value="high" />
<embed src="../FusionCharts/FCF_MSArea2D.swf" flashVars="&dataURL=Data.xml&chartWidth=600&chartHeight=500" quality="high" width="600" height="500" name="Column3D" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

Here is that I tried:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="600" height="500" id="Column3D" >
<param name="movie" value="../../../../FusionCharts/FusionCharts/FCF_MSArea2D.swf" />
<param name="FlashVars" value=<%strXML%>&chartWidth=600&chartHeight=500">
<param name="quality" value="High" />
<embed src="../../../../FusionCharts/FusionCharts/FCF_MSArea2D.swf" flashVars="&<%strXML%>&chartWidth=600&chartHeight=500" quality="High" width="600" height="500" name="Column3D" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

(in reply to chadb)
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: Why can't I do this? - 1/30/2008 12:12:30   
quote:

but can I take that strXML and write it to a .xml page?

Not directly.

That code has to run on an .ASP page. So there are 2 options:

1. Get the ASP page to write out the .XML file using FSO.

2. Have the XML parser (the object getting the data) go to the ASP page instead. Remember, for valid XML the page does not *have* to be .XML. I have many applications where my XML page is an ASP page with XML-only output. The parser doesn't know any difference except for the file extension. If you can get the other end to grab the .ASP page, this method should work.

Hope it helps.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to chadb)
chadb

 

Posts: 485
From: Kansas
Status: offline

 
RE: Why can't I do this? - 1/30/2008 12:20:54   
rdouglass, not sure if you saw my post above yours, I think I was editing it when you sent your.

Thanks

(in reply to rdouglass)
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: Why can't I do this? - 1/30/2008 12:21:59   
quote:

I have confirmed my variable (stmXML) is correct


You've confirmed this? Including the chart graph element as in:

<graph bgcolor='FFFFFF' caption='....

When you output to the textbox you mentioned before, what exactly was displayed in the box? Having just <set /> elements is not enough, you need the <graph ...> and </graph> tags enclosing the whole thing as well as <trendlines> if you're using them.

That help any?

EDIT. And also remeber XML is very structured and unforgiving when it comes to opening and closing tags and nesting them.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to rdouglass)
chadb

 

Posts: 485
From: Kansas
Status: offline

 
RE: Why can't I do this? - 1/30/2008 12:33:37   
Here it is. How I tested it was I have this all working through an xml page. I copied the text from the box, copied over the xml page, and the chart worked. When I do it this way is says"Error in loading data"

-<graph caption='AMC Performance'>
-<categories>
<category name ='1' />
<category name ='678' />
<category name ='87' />
<category name ='21' />
</categories>
-<dataset seriesname='Goal'>
<set value ='22' />
<set value ='78' />
<set value ='87' />
<set value ='21' />
</dataset>
-<dataset seriesname='Actual'>
<set value ='12' />
<set value ='87' />
<set value ='87' />
<set value ='21' />
</dataset>
</graph>

(in reply to chadb)
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: Why can't I do this? - 1/30/2008 16:10:39   
quote:

-<graph caption='AMC Performance'>
-<categories>
<category name ='1' />
<category name ='678' />
<category name ='87' />
<category name ='21' />
</categories>
-<dataset seriesname='Goal'>
<set value ='22' />
<set value ='78' />
<set value ='87' />
<set value ='21' />
</dataset>
-<dataset seriesname='Actual'>
<set value ='12' />
<set value ='87' />
<set value ='87' />
<set value ='21' />
</dataset>
</graph>


And that's exactly how it came out in the textbox and not just showing on the page? A textbox, right? If so, I see 2 things:

1. You have some dashes "-" in there that need to go.
2. Everything should be on 1 line without linebreaks.

Something like this is what we want the ASP scripting to output:

"<graph caption='AMC Performance'><categories><category name ='1' /><category name ='678' /><category name ='87' /><category name ='21' /></categories><dataset seriesname='Goal'><set value ='22' /><set value ='78' /><set value ='87' /><set value ='21' /></dataset>-<dataset seriesname='Actual'><set value ='12' /><set value ='87' /><set value ='87' /><set value ='21' /></dataset></graph>"

No spaces or stuff in between the tags; just make it all 1 single line. That make any difference?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to chadb)
chadb

 

Posts: 485
From: Kansas
Status: offline

 
RE: Why can't I do this? - 1/30/2008 16:17:21   
OK, I got it all on 1 line. Same issue, is this syntax right for the variable?
<param name="FlashVars" value="<%strXML%>&chartWidth
flashVars="&<%strXML%>

I read on another post that maybe it is something like:
flashvars="xmlfile=

I am not opposed to writing to an xml file use FSO, but I have no clue on how to do that?

Thanks

(in reply to rdouglass)
rdouglass

 

Posts: 9167
From: Biddeford, ME USA
Status: offline

 
RE: Why can't I do this? - 1/30/2008 17:17:51   
After I build the XML with ASP (and specify the chart type), this is my exact chart section I use on a working example:
<span style="overflow:none;">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="545" HEIGHT="400" id="FC2Column" ALIGN="">
<PARAM NAME=movie VALUE="Charts/<%=myChartType%>.swf?dataxml=<%=myXMLFeed%>">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<PARAM NAME=outCnvBaseFontSze VALUE=8>
<embed src="Charts/<%=myChartType%>.swf?dataxml=<%=myXMLFeed%>" quality="high" bgcolor="#FFFFFF" WIDTH="545" HEIGHT="400" NAME="FC2Column" ALIGN TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</OBJECT>
</span>



and here is the exact code it outputs:


<span style="overflow:none;">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="545" HEIGHT="400" id="FC2Column" ALIGN="">
<PARAM NAME=movie VALUE="Charts/FC2column.swf?dataxml=<graph bgcolor='FFFFFF' caption='Unit Cost History for Pioneering' subCaption='In Dollars per LF' yaxisname=' Labor' xaxisname='Cost / Unit by Month' canvasbgcolor='749A9A' gridbgcolor='CFDFDF' hovercapbg='FFECAA'  hovercapborder='F47E00' divlinecolor='F47E00'><set name='Jul' value='3.6576' color='3399FF' /><set name='Jul' value='3.3528' color='3399FF' /><set name='Jul' value='3.048' color='3399FF' /><set name='Jul' value='3.6576' color='3399FF' /><set name='Aug' value='3.6576' color='3399FF' /><set name='Aug' value='3.3528' color='3399FF' /><set name='Aug' value='3.048' color='3399FF' /><set name='Aug' value='3.6576' color='3399FF' /><set name='Aug' value='3.6576' color='3399FF' /><set name='Aug' value='3.3528' color='3399FF' /><set name='Aug' value='3.048' color='3399FF' /><set name='Aug' value='3.6576' color='3399FF' /><trendlines><line value='11.25' displayValue='AVG:11' color='' thickness='1' /></trendlines></graph>">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<PARAM NAME=outCnvBaseFontSze VALUE=8>
<embed src="Charts/FC2column.swf?dataxml=<graph bgcolor='FFFFFF' caption='Unit Cost History for Pioneering' subCaption='In Dollars per LF' yaxisname=' Labor' xaxisname='Cost / Unit by Month' canvasbgcolor='749A9A' gridbgcolor='CFDFDF' hovercapbg='FFECAA'  hovercapborder='F47E00' divlinecolor='F47E00'><set name='Jul' value='3.6576' color='3399FF' /><set name='Jul' value='3.3528' color='3399FF' /><set name='Jul' value='3.048' color='3399FF' /><set name='Jul' value='3.6576' color='3399FF' /><set name='Aug' value='3.6576' color='3399FF' /><set name='Aug' value='3.3528' color='3399FF' /><set name='Aug' value='3.048' color='3399FF' /><set name='Aug' value='3.6576' color='3399FF' /><set name='Aug' value='3.6576' color='3399FF' /><set name='Aug' value='3.3528' color='3399FF' /><set name='Aug' value='3.048' color='3399FF' /><set name='Aug' value='3.6576' color='3399FF' /><trendlines><line value='11.25' displayValue='AVG:11' color='' thickness='1' /></trendlines></graph>" quality="high" bgcolor="#FFFFFF" WIDTH="545" HEIGHT="400" NAME="FC2Column" ALIGN TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</OBJECT>
</span>


Also, I noticed this in your code:

="../../../../FusionCharts/FusionCharts/FCF_MSArea2D.swf

Does your server have parent paths enabled? It should if your test data works OK.

Last bit of advice I have is that you said this:
quote:

How I tested it was I have this all working through an xml page.

Does your output look just like that page?

That help any?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to chadb)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Why can't I do this?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts