|
List Info
Thread: dynamic chart creation (CP 2.2)
|
|
| dynamic chart creation (CP 2.2) |

|
2006-11-02 23:47:14 |
|
On 11/2/06, Tim Roberts < timr probo.com">timr probo.com> wrote:
dimitri pater wrote: > Any idea? Your help is appreciated!
There are several ways. One way is to have an <iframe> to hold your chart, have some Javascript that refreshes it when the user hits <submit>.
Another way is to use something like AJAX to fetch the file name, and modify the <img> tag on the fly to insert the new filename. Tho se are both good ways. I think you could also make the form action on the /water page *be* the /water page, and then have your CherryPy handler for /water perform different actions depending on whether the request method was GET or POST. On a GET, just display the form; on a POST, load the image and stick it in the page (and optionally redisplay the form).
Personally, I like Tim's suggestions better, but I thought I would throw this out there.
Christian http://www.dowski.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users googlegroups.com To unsubscribe from this group, send email to cherrypy-users-unsubscribe googlegroups.com For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users -~----------~----~----~----~------~----~------~--~---
|
| dynamic chart creation (CP 2.2) |

|
2006-11-03 11:59:10 |
|
Thanks for your suggestions both! Got it working now, not perfect but getting there... thanks, Dimitri
On 11/3/06, Christian Wyglendowski < christian dowski.com">
christian dowski.com> wrote:On 11/2/06, Tim Roberts
< timr probo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">timr probo.com> wrote:
dimitri pater wrote: > Any idea? Your help is appreciated!
There are several ways. One way is to have an <iframe> to hold your chart, have some Javascript that refreshes it when the user hits <submit>.
Another way is to use something like AJAX to fetch the file name, and modify the <img> tag on the fly to insert the new filename. Th ose are both good ways. I think you could also make the form action on the /water page *be* the /water page, and then have your CherryPy handler for /water perform different actions depending on whether the request method was GET or POST. On a GET, just display the form; on a POST, load the image and stick it in the page (and optionally redisplay the form).
Personally, I like Tim's suggestions better, but I thought I would throw this out there.
Christian
http://www.dowski.com
-- --- You can't have everything. Where would you put it? -- Steven Wright --- please visit www.serpia.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users googlegroups.com To unsubscribe from this group, send email to cherrypy-users-unsubscribe googlegroups.com For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~---
|
[1-2]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|