Otto wrote:
> Is it possible to have some kind of interface between
cherrypy and
> javascript so that I could capture events like
'onClick=...' ?
>
> What I want to accomplish is that a user can click on a
hyperlink and
> the click is captured by 'onClick' which then launches
some python code
> that does something useful. I do not want to leave the
webpage
> (CheeryPy function) I'm currently at at that point.
>
> Anyone any ideas on how to accomplish this?
>
You need to think about who the players are here.
"onClick" is running
in the browser. CherryPy is running in the server. There
is no connection.
Now, you can certainly have your onClick handler send an
HTTP request
back to your server, and update your web page based on the
results.
That's the entire principle behind AJAX.
--
Tim Roberts, timr probo.com
Providenza & Boekelheide, Inc.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
|