Re: [web2py] Re: Implementing sweetalert js into web2py

2019-02-21 Thread Ben Duncan
Ok, got it Thanks a lot .. *Ben Duncan* DBA / Chief Software Architect Mississippi State Supreme Court Electronic Filing Division On Thu, Feb 21, 2019 at 3:53 AM Val K wrote: > You can use conditional rendering in the view like a following: > {{if 'js_args' in response._vars:}} >

Re: [web2py] Re: Implementing sweetalert js into web2py

2019-02-21 Thread Val K
You can use conditional rendering in the view like a following: {{if 'js_args' in response._vars:}}

Re: [web2py] Re: Implementing sweetalert js into web2py

2019-02-20 Thread Ben Duncan
Val, is there a way to something along the lines of this (controller) Where the Javascript is ONLY fired off if a certain condition is met? Thanks ... -- def

Re: [web2py] Re: Implementing sweetalert js into web2py

2019-02-19 Thread Ben Duncan
WHoa H ! Thanks VAl that works *Ben Duncan* DBA / Chief Software Architect Mississippi State Supreme Court Electronic Filing Division On Fri, Feb 15, 2019 at 2:39 PM Val K wrote: > > include arguments (that it should be json-serializable object) to pass to > js-code in the contr

Re: [web2py] Re: Implementing sweetalert js into web2py

2019-02-15 Thread Val K
include arguments (that it should be json-serializable object) to pass to js-code in the controller output: # controller.py def foo(): ... js_args = dict(message = 'Hi there!') return dict(..., js_args = js_args) insert script into your view $(document).ready( fu

Re: [web2py] Re: Implementing sweetalert js into web2py

2019-02-15 Thread Ben Duncan
Sorry, to sound like a newb on this. I've really been dealing with and into javascript for , um 36 hours now ? 😅 *Ben Duncan* DBA / Chief Software Architect Mississippi State Supreme Court Electronic Filing Division On Fri, Feb 15, 2019 at 1:36 PM Ben Duncan wrote: > Ok, that works ... NOW wha

Re: [web2py] Re: Implementing sweetalert js into web2py

2019-02-15 Thread Val K
Are you familiar with jQuery? If you're not, it's better to start with it + there are some examples in the book -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues

Re: [web2py] Re: Implementing sweetalert js into web2py

2019-02-15 Thread Ben Duncan
Ok, that works ... NOW what ? Can I incorporate it in the controllers ? *Ben Duncan* DBA / Chief Software Architect Mississippi State Supreme Court Electronic Filing Division On Fri, Feb 15, 2019 at 1:32 PM Ben Duncan wrote: > Just call some if it's functions and pop ups ... > > *Ben Duncan* >

Re: [web2py] Re: Implementing sweetalert js into web2py

2019-02-15 Thread Ben Duncan
Just call some if it's functions and pop ups ... *Ben Duncan* DBA / Chief Software Architect Mississippi State Supreme Court Electronic Filing Division On Fri, Feb 15, 2019 at 1:23 PM Val K wrote: > You can open browser console (usually Ctrl+Shit+j) and try > Swal.fire('Hello world!') > How do

[web2py] Re: Implementing sweetalert js into web2py

2019-02-15 Thread Val K
You can open browser console (usually Ctrl+Shit+j) and try Swal.fire('Hello world!') How do you plan to use it? On Friday, February 15, 2019 at 8:21:01 PM UTC+3, Ben Duncan wrote: > > How would I go about implementing and using sweetalery in web2py? > see: > https://sweetalert2.github.io/ > > I'