List Info

Thread: dynamic chart creation (CP 2.2)




dynamic chart creation (CP 2.2)
user name
2006-11-02 23:47:14
On 11/2/06, Tim Roberts < timrprobo.com">timrprobo.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.

 Those 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&quot; group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

dynamic chart creation (CP 2.2)
user name
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 < christiandowski.com"> christiandowski.com> wrote:
On 11/2/06, Tim Roberts < timrprobo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">timrprobo.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.

 Those 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
--~--~---------~--~----~------------~-------~--~----~
&nbsp;You received this message because you are subscribed to the Google Groups "cherrypy-users&quot; group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to cherrypy-users-unsubscribegooglegroups.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 )