If the loading div is not hiding it means that the javascript in the complete method is throwing an error so the scripts stop running.
I recommend using the Firebug extension for mozilla firefox. After installing it you can select the "console" tab. This will display any javascript errors as well as let you run standalone javascript commands for testing. I believe the 'loaded' command is a bit of a misnomer. They mention it in the documentation. It actually fires after the data is loaded but before the view is rendered so it makes sense that it is working off of your the previous value On Fri, Nov 13, 2009 at 8:10 PM, lauraw <[email protected]> wrote: > Okay, bear with me ... I'm learning cake, javascript, and ajax all at > the same time :-) ... and prototype > > I added 'loaded' for observeField() and the javascript code to check > the length of the select element > > if ( $("pstyle_sel").length == 0) > $("style").hide(); > > this kind of works. The first time I select something that doesn't > have styles, it doesn't hide the row. Next I selected something that > did have styles and it HID THE ROW. It's like it's seeing the data > from the previous ajax request, like it's one step behind? > > I'm using 'loaded' instead of 'complete' because when I used > 'complete' my ajax loading indicator just kept displaying even though > the request was done. > > Any ideas on why my javascript is lagging? Or have you seen this > continual ajax loading indicator when using 'complete'? > > Thanks, guys for your input! > > -- > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<cake-php%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/cake-php?hl=. > > > -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
