I am using response.files to add my own css to override base.css. I
will now use my own include file instead.

The component is a form. When I submit the form then it reloads via
ajax. When web2py_ajax is loaded this shows the flash messages. The
flash messages do not show up unless explicitly called somewhere. Of
course I can always add the code calling up the flash messages myself
explicitly.

So overall this is not an unfixable problem. Just thought maybe there
was a way of avoiding the error in the first place with a tweak to the
calendar function.

On Jul 12, 4:29 pm, Anthony <abasta...@gmail.com> wrote:
> I don't think it's common to include web2py_ajax.html in components.
> response.files is intended to be a way to include CSS and JS files in the
> page's <head></head> -- however, your component won't be able to do that
> anyway since the main page has already loaded. Components should still be
> able to display flash messages on the page. Can you show an example of what
> you're trying to do in your component view that requires including
> web2py_ajax.html in it?
>
> Anthony
>
>
>
>
>
>
>
> On Tuesday, July 12, 2011 11:11:35 AM UTC-4, apple wrote:
> > I have a form which is loaded as a component using LOAD.
>
> > The master page includes web2py_ajax.html and each component also
> > loads this file. However this  prevents date fields from working in
> > the form. When I click on a date field the calendar appears as normal,
> > but when I select a date I get a javascript error in Chrome of
> > "Uncaught range error maximum stack size exceeded" and
> > "Date.setFullYear" is repeated a number of times. The error in Firefox
> > is "too much recursion".
>
> > A workaround is to leave out web2py_ajax.html in the components. But
> > then I have to manually add in the bits that are needed such as
> > loading response files, and initializing flash messages....and I am
> > not sure what else is used by the components.

Reply via email to