Re: JSMX cfchart
The /chart.jpg suffix is a fix for any buggy software that use file extension instead of mime-type for deciding if something is an image or not. (Plus it helps indicate/remind other programmers and users what the script is doing.) What it actually is a CGI variable called Path Info - anything after the filename but before the query string (the bit after the question mark) is the path info. As a quick aside, URLs are made up (roughly) in the following way: PROTOCOL:SERVER:PORT/SCRIPT_NAME/PATH_INFO?QUERY_STRING Here is how things work on the web interface here: PROTOCOL=http SERVER=//www.houseoffusion.com PORT=[none] (defaults to 80 if not defined) SCRIPT_NAME=/groups/CF-Talk/thread.cfm PATH_INFO=/threadid:48034 QUERY_STRING=[none] As you see, path_info can be used similar to query_string, but whilst QS is generally treated as a 'dynamic' property, PI is a 'static' one. (Hence many search engines will index the path_info part of a URL, but not always the query_string part) Of course, looking at your other discussion thread, cfchart generates HTML not a JPEG, so this is all a little academic, but it's nice to learn new things every now and then. :) (And hopefully I haven't confused things further.) this does actually make alot of sense peter. Can i just ask about the following lines of code: document.getElementById('mychart').src= '/generate_chart.cfm/chart. jpg?params='+v; i understand the v is the variable of the select option that was just changed but why is the chart.jpeg? added is it because the cfchart tag in the generate_chart.cfm page will generate a jpeg called chart.jpeg and therefore we are now equalling the source to that outputted jpeg? thanks again peter ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255133 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: JSMX cfchart
thanks peter, your right with the other thread i cant use it for what i wanted but this is very interesting to learn. as you could tell i didnt understand what was really going on in the address but now it is a bit clearer to me. thanks very much for your help :) ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255139 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: JSMX cfchart
I think it's probably simpler to put the cfchart in its own script that is called by an IFRAME and just reload that page by changing the IFRAME src as appropriate. JSMX (and AJAX in general) is designed to transfer ASCII data (XML, JS, etc), not a binary Flash file (which I think is what cfchart generates). hi, i would like to change the bars in a bar chart using cfchart when the user selects options from a cfselect i am just wondering if someone has a simple example that i can work with using JSMX. i was thinking that maybe i need to set up a component that takes parameters of the selected options and then build the chart and send it back, but i am not sure on how to do this with JSMX i would really appreciate any help thanks ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255027 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: JSMX cfchart
do you think the only way to get around this is to find some form of javascript chart? thanks ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255038 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: JSMX cfchart
If it's a JPEG then you could just have an IMG tag, and change the SRC. ie: img id=mychart src=http://myserver.com/generate_chart.cfm/chart.jpg?params=1/ select onchange=showGraph(this.value) option value=1Something/option option value=2Something Else/option option value=3Another Thing/option /select script type=text/javascript function changeGraph(v) { document.getElementById('mychart').src= '/generate_chart.cfm/chart.jpg?params='+v; } /script Something along the lines of that, with generate_chart having nothing except a cfchart tag (and any related processing of parameters). That make sense? your right the cfchart can be created using the flash method, but also it generates a jpeg of the chart instead of flash which is the method i am using. I dont really want the page to be refreshed as there are multiple ways that the user can change the data in the chart, therefore it will be a bit tedious for them having to wait for the page to be reloaded everytime they click something. is it possible to pass over a jpeg file using JSMX? thanks ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255045 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: JSMX cfchart
thanks for the reply peter. So if i understand you correctly. when the user changes the cfselect option the generate_chart.cfm is being called. this cfm page is being sent the parameters, building the chart jpeg with the cfchart tag, and then the jpeg source is being updated in the current page. therefore the page wont have to be refreshed and Ajax isnt need either? thanks peter, i really appreciate your help ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255049 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: JSMX cfchart
this does actually make alot of sense peter. Can i just ask about the following lines of code: document.getElementById('mychart').src= '/generate_chart.cfm/chart. jpg?params='+v; i understand the v is the variable of the select option that was just changed but why is the chart.jpeg? added is it because the cfchart tag in the generate_chart.cfm page will generate a jpeg called chart.jpeg and therefore we are now equalling the source to that outputted jpeg? thanks again peter ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255050 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4