confirm is a built-in JS function. :-)

On Saturday, 5 January 2019 10:16:37 UTC-8, Weronika Swiechowicz wrote:
>
> I have the following buttons and form definitions:
>
> buttons=[INPUT(_type=*'button'*,
>
>                       _value=*'Upload Message**'*,
>
>                       _onclick=*"return confirm('Confirm deletion of 
> asset. This will also remove asset from all groups.');"*),
>
>         INPUT(_type=*'submit'*, _value=*'Submit'*)]
>
>
>     form = SQLFORM.factory(
>
>                            Field(*'file_type'*,
>
>                                  label = *'Dictionary Type'*,
>
>                                  requires=IS_IN_SET([ i[
> *'DICTIONARY_TYPE'*] for i in db(db.DATA_DICTIONARIES.ACTIVE_ID == 
> *'A'*).select(db.DATA_DICTIONARIES.DICTIONARY_TYPE)] 
> if len(db(db.DATA_DICTIONARIES.ACTIVE_ID == 
> *'A'*).select(db.DATA_DICTIONARIES.DICTIONARY_TYPE)) 
> > 4 else list_dictionary_types  )),
>
>                            Field(*'file_version'*,
>
>                                  label = *'Dictionary Version'*,
>
>                                  requires=IS_NOT_EMPTY()
>
>                            ),
>
>                            Field(*'file_directory'*,
>
>                                  label = *'File Path'*,
>
>                                  _type = *'string'*,
>
>                                  requires=IS_NOT_EMPTY()
>
>                            ),
>
>                           buttons = buttons)
>
>                     
>
>        )
>
>
> Everything works as expected. The question I have is, where is the 
> "confirm()" function definition I used in the "INPUT(_type=*'button'*, 
> _value=*'Upload Message**'*,_onclick=*"return confirm('Confirm deletion 
> of asset. This will also remove asset from all groups.');"*)," defined? I 
> tried searching for it and came across html.py file with confirm function 
> on line 2316. However, no matter how I edit it or whatever I comment out 
> (commented 
> out inputs definitions), I still get the same output back as before the 
> changes. Is there any other place where confirm() is defined? If not, why 
> commenting out the inputs yields no changes?
>

-- 
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)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to