Hello I have been working with Scriptacoulous for easy functions before but this time it's a little bit more advanced than that. I want my div to first be pushed up with Effect.SlideUp, then change its content using Ajax.Updater and then finally slide it back down using Effect.SlideDown... so I created a function that looks like this: function ChangePage(pageNumber) { new Effect.SlideUp($('Content')); new Ajax.Updater($('Content'), 'page.php?p=' + pageNumber); new Effect.SlideDown($('Content')); return false; }
But.... it doesn't seem to work. When executing the site and hitting the links from which I execute this function, nothing happens. I was hoping someone could help me. I include the entire site below... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" type="text/css" href="style.css" /> <title>Terrvik Trophy™</title> <script src="javascripts/prototype.js" type="text/javascript"></ script> <script src="javascripts/scriptaculous.js" type="text/javascript"></ script> <script type="text/javascript"> function ChangePage(pageNumber) { new Effect.SlideUp($('Content')); new Ajax.Updater($('Content'), 'page.php?p=' + pageNumber); new Effect.SlideDown($('Content')); return false; } </script> </head> <body> <div class="content"> <img src="terrviklogga.jpg" style="float: right; width: 414px; height: 542px"> <h1>Terrvik Trophy™</h1> <h3> <a href="#" onclick="ChangePage(2006)">2006</a> <a href="#" onclick="ChangePage(2007)">2007</a> <a href="#" onclick="ChangePage(2008)">2008</a> </h3> <div id="Content"> Some text as a start... </div> <div class="nyheter"> <ul> <li>Nyhetsexempeltest</li> <li>Nyhetsexempeltest</li> </ul> </div> </div> </body> </html> --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---