Thanks for the suggestions, gevent looks good but I am indeed using pyodbc
and this seems to be working with Apache so I'd rather stick with this for
time being. (Note I had to embedd the Python27.dll manifest into pyodbc.pyd
to get it to work with Apache).

The reason for using ajax in the first place was naivety. At the time I
simply looked up how to call a controller function from javascript and read
that ajax() was the way to do it, so proceeded with that without
understanding the implications.

The feature in question is a check list, which I go over with
jQuery.each(). If checked: copy the value to a hidden field, and call ajax
to insert a record in the database including that field and couple others.
Once done, set windows.location to same page to reaload it.
The page has a form on it elsewhere, so I didn't want to make this a form
as I kept getting a "confirm resubmission" popup (this is going from
memory, it was actually written a long time ago).

I've now changed it so each() collate all the values into a string (they're
ints) and pass to a url which I navigate to with windows.location, that
page does the insert and returns back to previous page. No ajax in there
whatsoever :-)
I'm scouring the code for other places where I may have placed asynchronous
calls next to synchronous ones, which will only have worked by
"coincidence" up till now...
I know, I know. I might just pick up my copy of the pragmatic programmer
and throw it at myself. Hard.








On Thu, Nov 7, 2013 at 7:26 AM, Niphlod <[email protected]> wrote:

> hard ? with DAL it's pretty easy.... if a module exposes the dbapi just
> force the driver and implement the connect method and it's usually good to
> go.
> I'll test it when I get back home.
>
> --
> 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/PEC1uLfzlrU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/groups/opt_out.

Reply via email to