Matt,

+1

I, myself, can barely understand the need for such pattern.


On Jan 23, 2:00 pm, Matt Foster <[EMAIL PROTECTED]> wrote:
> You know, I understand that having JS come across in Ajax requests is
> handy.  Obviously I am not bashing the idea of JSON coming across the
> wire, but a lot of people use <script> tags and evaluate and run
> scripts that come in asynchronously.  Perhaps I am a stickler for
> structure but I believe that this is a horrible design pattern that
> leads to massive confusion.  If an object inside the request needs
> calendar functionality, why call it within that "document" request.
> Instead have an event listener to the Ajax.Updater's onComplete method
> and then within the listener function use Caledar.setup to apply to
> the newly integrated DOM object inside your new "document".
>
> On another note I wouldn't really refer to them as documents, an HTML
> document starts with <html> if it doesn't then its really an HTML
> fragment and should be considered as such.
>
> On Jan 23, 1:34 pm, "Brian Williams" <[EMAIL PROTECTED]> wrote:
>
> > you'll need to provide some sample links or some sample code...
>
> > what all javascript files are you using?  have you eliminated all other JS
> > files other than prototype and scriptaculous?
>
> > On Jan 23, 2008 12:26 PM, Mathieu Sachot <[EMAIL PROTECTED]> wrote:
>
> > > No ideas ?
>
> > > 2008/1/17, Mathieu Sachot <[EMAIL PROTECTED]>:
>
> > > >  Hi,
>
> > > > First, I'm a beginner in :
> > > > - Prototype
> > > > - English (I hope it will be understandable)
>
> > > > I have a little matter with prototype, with the ajax.updater object in
> > > > fact.
>
> > > > When I use an "object" like Calendar.setup or new AutoComplete in the
> > > > main document, there is no problem. In next step, I call a new document
> > > > through ajax.updater. In this document, I call again a new document,
> > > > always by ajax.updater. And in this second document, if I call
> > > > Calendar.setup or AutoComlete, Firefox tells me that Calendar is not
> > > > defined. I use evalScripts: true, but when I call a function which is 
> > > > define
> > > > in the main document, it works.
>
> > > > I think this is a newbee mistake, but I don't realy understand. Could
> > > > you help me ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to