Hi, Weird one. In terms of tracking it down, can I suggest doing this: Make a copy of the page in question with a new name, then strip out almost everything except (say) one effect, and see if that one thing works. If it doesn't, post a copy of it to Pastie[1] and post a link here. Maybe you'll find the problem in the process of doing that, and if not, maybe with a whole (but short) example page to look at, somewhere here will come up with an answer...
[1] http://pastie.org FWIW, -- T.J. Crowder tj / crowder software / com On Oct 27, 12:02 pm, stoshski <[EMAIL PROTECTED]> wrote: > Thanks very much for responding Matt. > > Checked the paths first hoping for a quick cure. Oddly, the centering > portions of the script work, however, without the scriptaculous events > appearing, etc. In fact, checking the script for errors in firefox > results in "effect not defined" for each line containing a > scriptaculous event. > > It all worked before the switch... > > Tremendous thanks in advance to you for your aid. > > -John > > On Oct 27, 5:50 am, Matt <[EMAIL PROTECTED]> wrote: > > > Apologies if this is painfully obvious/patronising, but have you made > > sure that any file paths that may have changed on the new server are > > correct? > > > On Oct 26, 8:20 pm, stoshski <[EMAIL PROTECTED]> wrote: > > > > My script used to work. Now it doesn't. The only thing that has > > > changed is the hosting service. Now my scriptaculous effects are not > > > defined. > > > > I'm a noob hanging off the edge of his learning curve. any help would > > > be greatly appreciated. I've included the troubled script. Thanks to > > > all in advance. > > > > script: > > > > //spinner function > > > Ajax.Responders.register({ > > > onCreate: function(){ $('spinner').show();}, > > > onComplete: function(){ > > > if(0==Ajax.activeRequestCount) > > > $('spinner').hide(); > > > } > > > }); > > > > //dynamicize function > > > var DynamicExtensions = { > > > dynamicize: function(element){ > > > element.dHref = element.href; > > > element.dTarget = element.target; > > > element.href = "#"+element.target; > > > element.target = ""; > > > element.dynamic = > > > dynamicallyLoad.bindAsEventListener(element); > > > Event.observe(element, 'click', element.dynamic); > > > } > > > } > > > > Element.addMethods(DynamicExtensions); > > > > function dynamicallyLoad(e) { > > > > new Effect.Fade('content',{duration:0.5, > > > afterFinish:function(){ > > > > element = Event.element(e); > > > new Ajax.Updater(element.dTarget, element.dHref, { > > > method: 'get', > > > onComplete: function() { > > > setLinks(element,element.dTarget); > > > new Effect.Appear('content', > > > {duration:0.5, from:0.0, to:1.0}); > > > > } > > > }); > > > }}); > > > } > > > > function setLinks(e, target) { > > > (target) ? selector = '#'+target+' ' : selector = ''; > > > $$(selector+'a.dynamic').invoke('dynamicize'); > > > } > > > > //link to fade function > > > function changeLinkToFade( el ) { > > > if (typeof(el) != 'object') el = $(el); > > > // copy the href > > > el.link = el.href; > > > el.href='#'; > > > Event.observe(el,'click',function(event) { > > > new Effect.Fade($('pageContainer'),{ > > > afterFinish:function() { > > > // fix the back button (make page Appear after changing > > > the > > > page) > > > new Effect.Appear($('pageContainer'),{duration: > > > 5}); > > > // change the location > > > window.location = el.link; > > > return false; > > > } > > > }); > > > return false; > > > }); > > > } > > > function initiateLinkToFade() { > > > $$('a.fade').each( function( el ) { changeLinkToFade( el > > > ); } ); > > > } > > > > //centering function > > > function center(){ > > > var windowHeight = document.viewport.getHeight(); > > > > var containerHeight = $('pageContainer').getHeight(); > > > > $('pageContainer').style.position='relative'; > > > > > > $('pageContainer').style.top=((windowHeight/2)-(containerHeight/2)) > > > +'px'; > > > } > > > > //hide load process > > > document.observe("dom:loaded", > > > function(){ > > > new Effect.Opacity('pageContainer',{duration:.1, > > > from:1.0, to:0}); > > > setLinks(); > > > }); > > > > //center before appearing > > > Event.observe(window, 'load', function(){ > > > center(); > > > new Effect.Opacity('pageContainer',{duration:25, from:0, > > > to:1.0}); > > > initiateLinkToFade(); > > > }); > > > > //center on window resize > > > window.onresize= function(){ > > > center(); > > > }- Hide quoted text - > > > - Show quoted text - > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
