You need to copy web2py.js from the latest welcome app into your old app.
On Wednesday, 9 October 2013 04:57:20 UTC-5, Michael Helbling wrote:
>
> Hello everybody
>
> First of all to avoid this question: Yes I copied the appadmin and
> javascript file from the welcome app to my own app ;-)
>
> My Problem is, that some LOAD(ajax=True) doesn't work any-more (but not
> all loads with ajax). If I change it to LOAD(ajax=False) it works. So it
> seems there is some problem with the javascripts.
>
> *1. Description of the setup*
>
> 1.
>
> {{=DIV
> <https://moe2.backbone.ch/examples/global/vars/DIV>(LOAD(f='getSelection.load',
> args=request <https://moe2.backbone.ch/examples/global/vars/request>.args,
> ajax=True), _id='Workspace')}} *#I load a selection in the View --> This Load
> WORKS*
>
> 2.
>
> SELECT <https://moe2.backbone.ch/examples/global/vars/SELECT>(selOptions,
> _size=15, _name='o_id', _onclick="\
>
> ajax('"+URL(r=request,args=[nav_id,tool_id,ntt_id],f='getForm')+"',['o_id'],'Workspace');",
> _class='ff_wide') *#In the selection is an onclick event that works too - it
> loads the form of an order*
>
> 3.
>
> IMG <https://moe2.backbone.ch/examples/global/vars/IMG>(_src=URL
> <https://moe2.backbone.ch/examples/global/vars/URL>('static','images/i24_save.png',
> extension=True), _title=T
> <https://moe2.backbone.ch/examples/global/vars/T>('Save only'), _border=0,
> _style='cursor:pointer;',\
> _onclick="ajax('"+URL
> <https://moe2.backbone.ch/examples/global/vars/URL>(r=request
> <https://moe2.backbone.ch/examples/global/vars/request>,args=[nav_id,tool_id,ntt_id,'save'],f='saveCustomer')+"',"+ajaxVars+",'Workspace');")
> *#In the form is an onclick event to the function 'saveCustomer'*
>
> 4.
>
> return LOAD(f='getForm', args=request
> <https://moe2.backbone.ch/examples/global/vars/request>.args, vars=rvars,
> ajax=True,target='Workspace') *#saveCustomer returns a LOAD to load the Form
> again*
>
> 5. The Form doesn't load, the page just displays "loading..." and the
> "Workspace" content looks as follows:
> <div id="Workspace"
>
> data-w2p_remote="/sipadm/registration/getForm.load/1/1/1/save?c_id=114999&c_type_id=10&city=Fribourg&clwarn=&comments=&company=&countrycode=ch&creditlimit=0.00001&firstname=Alessia&i_account=0&i_customer=0&i_product=9&isAccountReg=value&langcode=fr&&login=41325102428&mobile=&nzip=1700&o_billing_date=&o_id=131643&o_verify_date=&pa_id=1&phone=021+905+41+11&salut=Madame&sip_id=24141&status_id=0">loading...</div>
>
> If I replace in step 4 the ajax=True through ajax=False it works... If I
> copy the link in data-w2p_remote to the address bar, it works too..
>
>
> An other example is our Mail Form. Its a simple page with a Mail Form
> (From:, To:, etc.) and at the bottom we have a Attachment Form embedded
> with a load:
> LOAD(c='mail',f='attachForm',args=args,vars=request<https://moe2.backbone.ch/examples/global/vars/request>
> .vars, ajax=True)
>
> In the HTML the div looks like: <div id="c921071710755"
> data-w2p_remote="/sipadm/mail/attachForm/3/13/0/202?mail_id=202">loading...</div>
> The path is correct, i can copy the data-w2p_remote path to the address
> bar and it loads perfectly. Our productive system runs still on web2py
> 2.5.1. This problem occurs just on our staging system (web2py 2.7.2) since
> we upgraded it to >2.6.0 with the identical code.
>
>
> *2. What I tried to fix it*
>
> 1. after updating, all Loads didn't work, so i had to copy the
> web2py.js and appadmin from the welcome app to all our apps, then ~50% of
> the loads worked
> 2. i tried to delete all js in the app and copied all new from the
> welcome app, still no change (jquery was updated through this copy to
> 1.10.2)
> 3. i compared the generic views and the layout.html with the welcome
> app, but there are no differences depending on the js
> 4. i replaced the web2py_ajax.html in the app with the new one.
> 5. The permissions on the files are ok (made after every change a
> chown -R on the folder) and i restartet uwsgi after every change
>
> But there is still no change.
>
> The Firefox debugger shows me a js failure on the loading page:
> [11:32:39.259] Empty string passed to getElementById(). @ jquery.js:3
> But i don't know if this is the root of the issue or not. 50% of the
> jquery script is on line 3, so i don't know which part causes this failure.
> i tried to insert more line brakes to the jquery script, but after that
> nothing worked anymore...
>
>
> Has anyone an idea, what the root of this issue could be? Or how to find
> out, which part of the jquery script causes the getElementById failure?
>
> I'm fighting with this problem since a few days and i don't know what to
> try anymore...
>
>
> Best Regards
>
> Michael
>
>
>
>
--
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.