Hello All
In my application I use the LOAD helper to insert a component in my page.
The component is a simple form that allows user to subscribe to the
newsletter.
When I refresh the page, I see a "loading..." message during 2 or 3
seconds, and then my component is loaded.
As my component is very simple, I wonder if this is normal to wait 3
seconds before loading the component?
Thank you very much
######## View 'render_page.html' ########
{{extend 'layout.html'}}
{{block footer}}
<!-- Newsletter -->
{{=LOAD('default', 'newsletter.load', ajax=True)}}
{{end}}
###############################
######## Controller 'default.py' #########
def newsletter():
"""
Allows to access the "newsletter" component
"""
form = SQLFORM(db.registered_user, _class='blueText')
if form.process().accepted:
response.flash = T('form accepted')
elif form.errors:
response.flash = T('form has errors')
return dict(form=form)
###################################
######### Component 'newsletter.load' #########
<div class="newsletter pull-right">
<div><h3>Newsletter</h3></div>
{{if not session.REGISTERED_EMAILS:}}
<p>{{=T('Please insert your email adress to receive our latest
news')}}</p>
{{=form}}
{{else:}}
<h5>{{=T('Registered email : %s' %(session.REGISTERED_EMAIL))}}</h5>
{{pass}}
</div>
<script>jQuery('input[type="text"]').css('width','100%');</script>
##########################################
--
---
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.