Display Popup Form

28 views
Skip to first unread message

Alexandru Vlad Furdui

unread,
Apr 21, 2020, 5:29:36 AM4/21/20
to 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

unread,
Apr 21, 2020, 5:46:53 AM4/21/20
to 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

unread,
Apr 21, 2020, 6:03:28 AM4/21/20
to 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
Reply all
Reply to author
Forward
0 new messages