Hi all... new to prototype and having trouble with Ajax.Updater. Running prototype 1.5.1 and Ajax.Updater works fine on firefox2 but will not work on IE7. Any thoughts? Tim --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Friday 23 March 2007 04:09, Tim Chenoweth wrote:> Hi all... new to prototype and having trouble with Ajax.Updater. Running > prototype 1.5.1 and Ajax.Updater works fine on firefox2 but will not work > on IE7. Any thoughts? >Hi Tim, Ajax.Updater does work with IE7, but IE7 is full of little quirks at the moment (to put it politely!). If you can post a sample that shows the problem you''re having, the list might be able to help. Regards, Dave> Tim-- ---------------------- 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 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 -~----------~----~----~----~------~----~------~--~---
Can you share some of the code? IE also has some problems updating content in certain elements (e.g., select lists). You might try to encapsulate the element you want to replace in a <div> which do get replaced in IE and then alter your server-side page to include the element whose content you were originally trying to replace. For example: <div id="container"> <select id="some_list"> <option>1</option> <option>2</option> </select> </div> Tim Chenoweth wrote:> Hi all... new to prototype and having trouble with Ajax.Updater. Running > prototype 1.5.1 and Ajax.Updater works fine on firefox2 but will not work on > IE7. Any thoughts? > > Tim > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks for responding. This is actually a very simple AJAX example I''m presenting to my web development class. I did it first without prototype (which works in both firefox and IE), then with prototype using Ajax.Update. All it does is present four links and loads a different html page into a <div> tag based on which link is clicked. As I said, works in firefox but not in IE7. I''ve tried it with both prototype 1.5.0 and 1.5.1 and neither works. Here is the code: ============================================================================================<!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> =======================================================================Again, thanks for the help! Tim --~--~---------~--~----~------------~-------~--~----~ 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 removing the comma after ''method: "get"'' in your code. Since you''re not creating any more properties within the parameters object, you don''t need it there anyway. It might be what''s causing IE to go nuts. -- Dash -- Tim wrote:> Thanks for responding. This is actually a very simple AJAX example > I''m presenting to my web development class. I did it first without > prototype (which works in both firefox and IE), then with prototype > using Ajax.Update. All it does is present four links and loads a > different html page into a <div> tag based on which link is clicked. > As I said, works in firefox but not in IE7. I''ve tried it with both > prototype 1.5.0 and 1.5.1 and neither works. Here is the code: > > ============================================================================================> <!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> > > =======================================================================> Again, thanks for the help! > > Tim > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Done...still doesn''t work. On Mar 23, 9:54 am, David Dashifen Kees <dashi...-NT0ononE2K1Wk0Htik3J/w@public.gmane.org> wrote:> Try removing the comma after ''method: "get"'' in your code. Since you''re > not creating any more properties within the parameters object, you don''t > need it there anyway. It might be what''s causing IE to go nuts. > > -- Dash -- > > Tim wrote: > > Thanks for responding. This is actually a very simple AJAX example > > I''m presenting to my web development class. I did it first without > > prototype (which works in both firefox and IE), then with prototype > > using Ajax.Update. All it does is present four links and loads a > > different html page into a <div> tag based on which link is clicked. > > As I said, works in firefox but not in IE7. I''ve tried it with both > > prototype 1.5.0 and 1.5.1 and neither works. Here is the code: > > > ============================================================================================> > <!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> > > > =======================================================================> > Again, thanks for the help! > > > Tim--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
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 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 -~----------~----~----~----~------~----~------~--~---