Re: [web2py] Re: How to -- Popup window: Record already exists are you sure you want to upload file?

2014-07-15 Thread Manuele Pesenti
Il 15/07/14 14:29, Austin Taylor ha scritto:
>
> That might work Manuele. How would the code look?
>
well... for the client side I'd start from something like that:
http://jsfiddle.net/dR9tH/19/ (via
http://stackoverflow.com/questions/647282/is-there-an-onselect-event-or-equivalent-for-html-select)

first of all define your web service that check for filename existence
and returns a json (for example) with the needed information

cheers

M.
> On Jul 15, 2014 1:39 AM, "Manuele Pesenti"  > wrote:
>
> Il 14/07/14 21:21, Niphlod ha scritto:
> > until the user clicks on "submit", there's no way for web2py (or
> you)
> > to know the name of the file being uploaded beforehand, using a
> normal
> > input type="file". it's just not how the browsers work.
> what about to set up a javascript event on the upload like
> onselect and
> make your check via ajax?
> just a suggest
> hope it could help
>
> M.
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: How to -- Popup window: Record already exists are you sure you want to upload file?

2014-07-15 Thread Austin Taylor
That might work Manuele. How would the code look?
On Jul 15, 2014 1:39 AM, "Manuele Pesenti" 
wrote:

> Il 14/07/14 21:21, Niphlod ha scritto:
> > until the user clicks on "submit", there's no way for web2py (or you)
> > to know the name of the file being uploaded beforehand, using a normal
> > input type="file". it's just not how the browsers work.
> what about to set up a javascript event on the upload like onselect and
> make your check via ajax?
> just a suggest
> hope it could help
>
> M.
>
> --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/F5jydKmKbeA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: How to -- Popup window: Record already exists are you sure you want to upload file?

2014-07-14 Thread Manuele Pesenti
Il 14/07/14 21:21, Niphlod ha scritto:
> until the user clicks on "submit", there's no way for web2py (or you)
> to know the name of the file being uploaded beforehand, using a normal
> input type="file". it's just not how the browsers work. 
what about to set up a javascript event on the upload like onselect and
make your check via ajax?
just a suggest
hope it could help

M.

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.