Hey guys, I wrote this script and it''s working great in Firefox (osx), but not at all in Safari. Did i miss type something here? thanks, jacob you can check it out at - jacobgolden.com/lyrics var t = ''content_main'' function a(url) { new Effect.Fade(t,{ afterFinish: function ap() { new Ajax.Updater(t, url, { method: ''get'' , onComplete: function ap(){ new Effect.Appear(t); } }); }}); } <li id="s1"><a href="lyrics/out-come-the-wolves" onclick="a(''j/lyrics/ wolves.html''); return false;">Out Come The Wolves<span></span></a> </li> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
jg
2007-May-30 21:56 UTC
Re: Updater working great in FF not at all in Safari...Any ideas?
I Still can''t figure this out but I did notice that I named the third function the same as the second. I changed that. but it still doesn''t work in Safari. maybe there''s something wrong with my onclick? Any help is greatly appreciatted! thanks, jacob updated code - var t = ''content_main'' function a(url) { new Effect.Fade(t,{ afterFinish: function aj() { new Ajax.Updater(t, url, { method: ''get'' , onComplete: ap = function(){ new Effect.Appear(t); } }); }}); } <li id="s1"><a href="lyrics/out-come-the-wolves" onclick="a(''j/lyrics/ wolves.html''); return false;">Out Come The Wolves<span></span></a> </li> On May 29, 2:13 pm, jg <golden.so...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey guys, > I wrote this script and it''s working great in Firefox (osx), but not > at all in Safari. > Did i miss type something here? > thanks, jacob > you can check it out at - jacobgolden.com/lyrics > > var t = ''content_main'' > function a(url) > { > new Effect.Fade(t,{ afterFinish: > function ap() { > new Ajax.Updater(t, url, > { method: ''get'' , onComplete: > function ap(){ > new Effect.Appear(t); > > } > }); > }}); > } > > <li id="s1"><a href="lyrics/out-come-the-wolves" onclick="a(''j/lyrics/ > wolves.html''); return false;">Out Come The Wolves<span></span></a> > </li>--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Michael Peters
2007-May-30 22:03 UTC
Re: Updater working great in FF not at all in Safari...Any ideas?
jg wrote:> updated code - > > var t = ''content_main'' > function a(url) > { > new Effect.Fade(t,{ afterFinish: > function aj() { > new Ajax.Updater(t, url, > { method: ''get'' , onComplete: > ap = function(){ > new Effect.Appear(t); > } > }); > }}); > }For the love of something, please learn to indent your code. That''s almost impossible to work with. No wonder you''re having problems :) After I indented your code, I could see one possible reason it doesn''t work. Your defining your anonymous functions with names. It''s possible this works in FF because it evaluates to the functions that was created. var t = ''content_main'' function a(url){ new Effect.Fade(t,{ afterFinish : function () { new Ajax.Updater(t, url, { method : ''get'' , onComplete : ap = function() {new Effect.Appear(t);} }); } }); } -- Michael Peters Developer Plus Three, LP --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
jg
2007-May-31 01:23 UTC
Re: Updater working great in FF not at all in Safari...Any ideas?
Sorry for the novice scripting. Thanks Michael that did the trick. Although in Safari once the new content has Appeared it the quickly disappears. I heard this an issue with opacity and Safari not liking it Opacity set all the way to 1. I changed it to effect.grow and that works fine although not as sexy as appear! cheers, jacob On May 30, 3:03 pm, Michael Peters <mpet...-aUYv5hkjw45l57MIdRCFDg@public.gmane.org> wrote:> jg wrote: > > updated code - > > > var t = ''content_main'' > > function a(url) > > { > > new Effect.Fade(t,{ afterFinish: > > function aj() { > > new Ajax.Updater(t, url, > > { method: ''get'' , onComplete: > > ap = function(){ > > new Effect.Appear(t); > > } > > }); > > }}); > > } > > For the love of something, please learn to indent your code. That''s almost > impossible to work with. No wonder you''re having problems :) > > After I indented your code, I could see one possible reason it doesn''t work. > Your defining your anonymous functions with names. It''s possible this works in > FF because it evaluates to the functions that was created. > > var t = ''content_main'' > function a(url){ > new Effect.Fade(t,{ > afterFinish : function () { > new Ajax.Updater(t, url, { > method : ''get'' , > onComplete : ap = function() {new Effect.Appear(t);} > }); > } > }); > > } > > -- > Michael Peters > Developer > Plus Three, LP--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---