Hi Tim, Thanks for posting the sample. I spotted a few issues with your code after a few minutes poking around.
- You have two <html> tags at the top of your listing. The browser will probably let you off on this count. - You're trying to import 'protoype.js' not 'prototype.js'. This will confuise it :) - but givers a different error from the one being reported at line 1 in your example. - The hyperlinks have href set to content1.html, as well as the onclick. In general, it's bad to set an onclick on a hyperlink, as the hyperlink has built in behaviour when you click it anyway - I quick-fixed it by setting the href='#' - Dash already mentioned the extra comma inside the object literal arg. That's known to upset IE (older versions as well as the IE7), but not Mozilla) When all of that was fixed, I found that the example worked in IE7 when sent from a web browser, but not if served straight off the filesystem. Mozilla was happy with the filesystem. I'm not sure why IE7 is being so fussy (IE6 didn't used to be), but in general, it's a good idea to use a web server anyway, even if serving up static content. There are plenty of free, lightweight ones around HTH Dave On Friday 23 March 2007 15:42, Tim wrote: > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// > www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <title>Sample 2_1</title> > <meta http-equiv="Content-Type" content="text/html; > charset=iso-8859-1" /> > <script src="../../../prototype/protoype.js" type="text/javascript"></ > script> > <script type="text/javascript"> > <!-- > > function makerequest(serverPage, objID) { > > var myAjax = new Ajax.Updater( > objID, > serverPage, > { > method: 'get', > } > ); > } > > //--> > </script> > <body onload="makerequest ('content1.html','hw')"> > <div align="center"> > <h1>My Webpage</h1> > <a href="content1.html" > onclick="makerequest('content1.html','hw'); return false;">Page 1</a> <a > href="content2.html" > onclick="makerequest('content2.html','hw'); return false;">Page 2</a> > > | <a href="content3.html" onclick="makerequest('content3.html','hw'); > > return false;">Page 3</a> | <a href="content4.html" > onclick="makerequest('content4.html','hw'); return false;">Page 4</a> > <div id="hw"></div> > </div> > </body> > </html> -- ---------------------- Author Ajax in Action http://manning.com/crane Ajax in Practice http://manning.com/crane2 Prototype & Scriptaculous in Action http://manning.com/crane3 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
