Display Popup Form

已查看 34 次
跳至第一个未读帖子

Alexandru Vlad Furdui

未读,
2020年4月21日 05:29:362020/4/21
收件人 cherrypy-users
Hello,

I am quite new with the CherryPy framework and i have a question that could be considered basic, but i couldn't find any documentation for it.
What i want to do is to create an app which displays some data in tables, and when i press a button, a popup form should be shown with several input fields.
The problem is how do i make the application show the form as a popup and not redirect me to a different page to do the popup ? If anyone has just a basic example, i can work from there. 

Thank you.

Sviatoslav Sydorenko

未读,
2020年4月21日 05:46:532020/4/21
收件人 cherryp...@googlegroups.com
Hey Alexandru,

вт, 21 квіт. 2020 о 11:29 Alexandru Vlad Furdui
<alexandru....@gmail.com> пише:
So CherryPy is a server-side web framework. This means that it only
deals with HTTP. What
you want to do requires client-side scripting (a.k.a. JavaScript). So
you have to decide how
you want to do it in JS, maybe choose from some popular frameworks
(Angular, React, Vue)
and then use it on the client-side. Some parts of what you'll need
would be templates of that
framework that the webserver would be serving as static files, along
with the js files. Besides
that, you'll probably want to implement some sort of REST API on the
side of CherryPy for
hitting the DB and so on.

Here's some basic (maybe slightly outdated) examples in docs:
* React: https://docs.cherrypy.org/en/latest/tutorials.html#tutorial-10-make-it-a-modern-single-page-application-with-react-js
* JQuery: https://docs.cherrypy.org/en/latest/tutorials.html#tutorial-8-make-it-smoother-with-ajax
* REST API: https://docs.cherrypy.org/en/latest/tutorials.html#tutorial-7-give-us-a-rest


--
Cheers,
Sviatoslav.

---
https://useplaintext.email/
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
---

Alexandru Vlad Furdui

未读,
2020年4月21日 06:03:282020/4/21
收件人 cherrypy-users
Ok, Thank you very much for the info.


On Tuesday, April 21, 2020 at 12:46:53 PM UTC+3, Sviatoslav Sydorenko (@webknjaz) wrote:
Hey Alexandru,

вт, 21 квіт. 2020 о 11:29 Alexandru Vlad Furdui
回复全部
回复作者
转发
0 个新帖子