ognen.plavevski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jun-18 13:02 UTC
window.addEvent ajax call
I''m calling an html page through an ajax call. I''m aware that in order to execute scripts in prototype you have to enable that feature, and you have to reformulate functions in order for them to work (Not good: function check(){; Good var good = function() ). However, if the script contains window.addEvent, it doesnt get executed. window.addEvent(''domready'', function() { bla bla... Is there a way to do this, or do i just avoid ajax calls for pages with scripts. The reason i use them in the first place is since i can avoid using iframes or separate page visits, and just place the content via an ajax call in a container. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Try an <A> tag with the href property. Ajax has its uses, a complete website is not one of them. You may want to evaluate your approach, Backbase had their site completely orchestrated through their Ajax framework, the usability was questionable and as of late they have changed the site back to a more conventional approach. If you must have javascript code streamed in from an external source you can use "eval" to get the source loaded into the browser''s memory. On Jun 18, 9:02 am, "ognen.plavev...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <ognen.plavev...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m calling an html page through an ajax call. I''m aware that in order > to execute scripts in prototype you have to enable that feature, and > you have to reformulate functions in order for them to work (Not good: > function check(){; Good var good = function() ). > However, if the script contains window.addEvent, it doesnt get > executed. > window.addEvent(''domready'', function() { bla bla... > > Is there a way to do this, or do i just avoid ajax calls for pages > with scripts. The reason i use them in the first place is since i can > avoid using iframes or separate page visits, and just place the > content via an ajax call in a container.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
ognen.plavevski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jun-21 16:43 UTC
Re: window.addEvent ajax call
I''m aware of that, it was just cooler to use an ajax call to fill in a div, rather than have that go to an iframe or fully reload the page... Back to the drawing board... On Jun 18, 9:57 pm, Matt <mattfoste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Try an <A> tag with the href property. > > Ajaxhas its uses, a complete website is not one of them. You may > want to evaluate your approach, Backbase had their site completely > orchestrated through theirAjaxframework, the usability was > questionable and as of late they have changed the site back to a more > conventional approach. > > If you must have javascript code streamed in from an external source > you can use "eval" to get the source loaded into the browser''s memory. > > On Jun 18, 9:02 am, "ognen.plavev...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" > > <ognen.plavev...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I''m calling an html page through anajaxcall. I''m aware that in order > > to execute scripts in prototype you have to enable that feature, and > > you have to reformulate functions in order for them to work (Not good: > > function check(){; Good var good = function() ). > > However, if the script containswindow.addEvent, it doesnt get > > executed. > >window.addEvent(''domready'', function() { bla bla... > > > Is there a way to do this, or do i just avoidajaxcalls for pages > > with scripts. The reason i use them in the first place is since i can > > avoid using iframes or separate page visits, and just place the > > content via anajaxcallin a container.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---