Hi there folks, * scriptaculous 1.7.1 * prototype 1.5.1 * IE5.0/Win2K I get two javascript errors in this browser and none of the others I test my app on (17 altogether). My application incorporates AJAX but as IE5 doesn''t have XMLHTTPrequest functionality I have a graceful degradation option where non-dynamic maps are shown instead (It''s a mapping application). The javascript is pulled-into the <head> of the HTML document thus: <script type="text/javascript" src="javascript/functions.js"></script> <script type="text/javascript" src="javascript/scriptaculous/lib/ prototype.js"></script> <script type="text/javascript" src="javascript/scriptaculous/src/ scriptaculous.js?load=slider"></script> <script type="text/javascript" src="javascript/app.js"></script> If Prototype loads correctly then an ''Ajax'' object should be available - so I check for it (below). This fails in IE5 so I let it render a basic version of the app which spits out HTML for a static map thus: function initAll() { /** * Does our UA understand the AJAX or Prototype code? If not: Show default ''latest.png'' image and thumbnails (JS is effectively ''switched off'') * Check that our UAs have loaded Prototype''s ''Ajax'' object AND that they can deal with XMLHttpRequest() * Prototype does indeed detect UAs'' AJAX capabilities, but IE5 can''t even load the code in the first place, so we have to do it again: */ if(typeof Ajax != ''undefined'') { getNewFile(); addHandler($(''make-http-request''),''click'',getNewFile,false); } // degrade gracefully to static ''latest.png'' map-image and thumbnails: else { // IE5.0/Win fails here renderDgrade(''noscript-div''); } } After both the errors occur the renderDgrade() function kicks-in as it should, but I want to rid myself of these errors which are (in order): 1). Line: 300 Char: 17 Error: Expected '')'' Code: 0 URL: http://localhost/path/to/my-app/ 2). Line: 45 Char: 8 Error: Exception thrown and not caught Code: 0 URL: http://localhost/path/to/my-app/ The first error I deduced as coming from prototype.js on line 299 (For some reason IE seems to refer to a line *after* the line the error is actually on) - I don''t think IE5 understands the javascript ''in'' keyword. So I hacked this line into a simple regex, which ''fixed it'', but then another error occurred further down the script and I didn''t want to keep hacking what I didn''t fully understand. The second error is in scriptaculous.js. Something about the throw/ catch keyword combo that isn''t being used to IE5''s satisfaction. But I''m not 100% au-fait with advanced concepts like throw/catch blocks. So has anyone come across this before? Any ideas on how to squash this bug? Is this a bug to be reported to scriptaculous/prototype? Many thanks for reading regardless. :-) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Unless it is absolutely necessary for some reason I would drop support for IE 5.0. Anyone running 2000 or later windows should at least have IE 6. Now that the usage for IE 5 is so low I have finally stopped supporting it. It''s on the order of a percent now... and I believe IE 5 is really only available for versions of Windows that Microsoft no longer supports. Some stats: http://www.thecounter.com/stats/2007/August/browser.php http://www.upsdell.com/BrowserNews/stat.htm http://www.w3schools.com/browsers/browsers_stats.asp http://www.webreference.com/stats/browser.html On Aug 12, 3:35 pm, phptek <r...-Z+K/hR1MF3xBDgjK7y7TUQ@public.gmane.org> wrote:> Hi there folks, > > * scriptaculous 1.7.1 > * prototype 1.5.1 > * IE5.0/Win2K > > I get two javascript errors in this browser and none of the others I > test my app on (17 altogether). > > My application incorporates AJAX but as IE5 doesn''t have > XMLHTTPrequest functionality I have a graceful degradation option > where non-dynamic maps are shown instead (It''s a mapping application). > > The javascript is pulled-into the <head> of the HTML document thus: > > <script type="text/javascript" src="javascript/functions.js"></script> > <script type="text/javascript" src="javascript/scriptaculous/lib/ > prototype.js"></script> > <script type="text/javascript" src="javascript/scriptaculous/src/ > scriptaculous.js?load=slider"></script> > <script type="text/javascript" src="javascript/app.js"></script> > > If Prototype loads correctly then an ''Ajax'' object should be available > - so I check for it (below). This fails in IE5 so I let it render a > basic version of the app which spits out HTML for a static map thus: > > function initAll() > { > /** > * Does our UA understand the AJAX or Prototype code? If not: Show > default ''latest.png'' image and thumbnails (JS is effectively ''switched > off'') > * Check that our UAs have loaded Prototype''s ''Ajax'' object AND that > they can deal with XMLHttpRequest() > * Prototype does indeed detect UAs'' AJAX capabilities, but IE5 can''t > even load the code in the first place, so we have to do it again: > */ > if(typeof Ajax != ''undefined'') > { > getNewFile(); > addHandler($(''make-http-request''),''click'',getNewFile,false); > } > // degrade gracefully to static ''latest.png'' map-image and > thumbnails: > else > { > // IE5.0/Win fails here > renderDgrade(''noscript-div''); > } > > } > > After both the errors occur the renderDgrade() function kicks-in as it > should, but I want to rid myself of these errors which are (in order): > > 1). > > Line: 300 > Char: 17 > Error: Expected '')'' > Code: 0 > URL:http://localhost/path/to/my-app/ > > 2). > > Line: 45 > Char: 8 > Error: Exception thrown and not caught > Code: 0 > URL:http://localhost/path/to/my-app/ > > The first error I deduced as coming from prototype.js on line 299 (For > some reason IE seems to refer to a line *after* the line the error is > actually on) - I don''t think IE5 understands the javascript ''in'' > keyword. So I hacked this line into a simple regex, which ''fixed it'', > but then another error occurred further down the script and I didn''t > want to keep hacking what I didn''t fully understand. > > The second error is in scriptaculous.js. Something about the throw/ > catch keyword combo that isn''t being used to IE5''s satisfaction. But > I''m not 100% au-fait with advanced concepts like throw/catch blocks. > > So has anyone come across this before? Any ideas on how to squash this > bug? Is this a bug to be reported to scriptaculous/prototype? > > Many thanks for reading regardless. :-)--~--~---------~--~----~------------~-------~--~----~ 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 jwmeigs and thanks for taking the time to respond. Unfortunately simply dropping support for IE5.0 isn''t an option. Looking at the web stats for the site I''m developing the app for, there are still a significant number of people out there using this browser or browsers that report themselves as such. Please see the screenshot here of our to-date, August 2007 MSIE stats: http://www.theruss.com/images/ie5.gif (Note: theruss.com is my personal site and *is not* the site onto which the application will ultimately be deployed) I''m sure the tiny sections of pertinent scriptaculous/Prototype code could be patched very quickly by someone only slightly more advanced in javascript than myself. But again, many thanks for your reply, Cheers. On Aug 14, 5:41 am, jwmeigs <tippingpi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Unless it is absolutely necessary for some reason I would drop support > for IE 5.0. Anyone running 2000 or later windows should at least have > IE 6. > > Now that the usage for IE 5 is so low I have finally stopped > supporting it. It''s on the order of a percent now... and I believe IE > 5 is > really only available for versions of Windows that Microsoft no longer > supports. > > Some stats:http://www.thecounter.com/stats/2007/August/browser.phphttp://www.upsdell.com/BrowserNews/stat.htmhttp://www.w3schools.com/browsers/browsers_stats.asphttp://www.webreference.com/stats/browser.html > > On Aug 12, 3:35 pm, phptek <r...-Z+K/hR1MF3xBDgjK7y7TUQ@public.gmane.org> wrote: > > > Hi there folks, > > > * scriptaculous 1.7.1 > > * prototype 1.5.1 > > * IE5.0/Win2K > > > I get two javascript errors in this browser and none of the others I > > test my app on (17 altogether). > > > My application incorporates AJAX but as IE5 doesn''t have > > XMLHTTPrequest functionality I have a graceful degradation option > > where non-dynamic maps are shown instead (It''s a mapping application). > > > The javascript is pulled-into the <head> of the HTML document thus: > > > <script type="text/javascript" src="javascript/functions.js"></script> > > <script type="text/javascript" src="javascript/scriptaculous/lib/ > > prototype.js"></script> > > <script type="text/javascript" src="javascript/scriptaculous/src/ > > scriptaculous.js?load=slider"></script> > > <script type="text/javascript" src="javascript/app.js"></script> > > > If Prototype loads correctly then an ''Ajax'' object should be available > > - so I check for it (below). This fails in IE5 so I let it render a > > basic version of the app which spits out HTML for a static map thus: > > > function initAll() > > { > > /** > > * Does our UA understand the AJAX or Prototype code? If not: Show > > default ''latest.png'' image and thumbnails (JS is effectively ''switched > > off'') > > * Check that our UAs have loaded Prototype''s ''Ajax'' object AND that > > they can deal with XMLHttpRequest() > > * Prototype does indeed detect UAs'' AJAX capabilities, but IE5 can''t > > even load the code in the first place, so we have to do it again: > > */ > > if(typeof Ajax != ''undefined'') > > { > > getNewFile(); > > addHandler($(''make-http-request''),''click'',getNewFile,false); > > } > > // degrade gracefully to static ''latest.png'' map-image and > > thumbnails: > > else > > { > > // IE5.0/Win fails here > > renderDgrade(''noscript-div''); > > } > > > } > > > After both the errors occur the renderDgrade() function kicks-in as it > > should, but I want to rid myself of these errors which are (in order): > > > 1). > > > Line: 300 > > Char: 17 > > Error: Expected '')'' > > Code: 0 > > URL:http://localhost/path/to/my-app/ > > > 2). > > > Line: 45 > > Char: 8 > > Error: Exception thrown and not caught > > Code: 0 > > URL:http://localhost/path/to/my-app/ > > > The first error I deduced as coming from prototype.js on line 299 (For > > some reason IE seems to refer to a line *after* the line the error is > > actually on) - I don''t think IE5 understands the javascript ''in'' > > keyword. So I hacked this line into a simple regex, which ''fixed it'', > > but then another error occurred further down the script and I didn''t > > want to keep hacking what I didn''t fully understand. > > > The second error is in scriptaculous.js. Something about the throw/ > > catch keyword combo that isn''t being used to IE5''s satisfaction. But > > I''m not 100% au-fait with advanced concepts like throw/catch blocks. > > > So has anyone come across this before? Any ideas on how to squash this > > bug? Is this a bug to be reported to scriptaculous/prototype? > > > Many thanks for reading regardless. :-)--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Have a look here: http://wiki.script.aculo.us/scriptaculous/show/SupportedBrowsers IE 5.0 is not supported (It shouldn''t have to be, a lot of stuff in IE 5.0 is plain broke beyond repair). I would treat the IE 5.0 edge case the same as 508 compliance and make a seperate site template that doesn''t rely on javascript or fancy css for the IE 5.0 browsers. To Anyone, why doesn''t Prototype have an offical supported browsers list? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Sure thing ;-) jdalton''s suggestion is probably the best. Have a plain no javascript section for IE 5.0 users. Also a note on your stats: Now I could be wrong, but... I think only 5.0 and 5.5 are relevant to PC Window Internet Explorer all those others are probably some weird browser or mobile device. By the way, everyone think developing for the web is tough cross browser, try the mobile word ! WURFL is a life saver though On Aug 14, 9:26 pm, jdalton <jdalton...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Have a look here:http://wiki.script.aculo.us/scriptaculous/show/SupportedBrowsers > > IE 5.0 is not supported (It shouldn''t have to be, a lot of stuff in IE > 5.0 is plain broke beyond repair). > I would treat the IE 5.0 edge case the same as 508 compliance and make > a seperate site template that doesn''t rely on javascript or fancy css > for the IE 5.0 browsers. > > To Anyone, why doesn''t Prototype have an offical supported browsers > list?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
oops and... even the 5.0 and 5.5 can be mobile devices or other browsers. It looks like IE 5.5 and below only counts for 0.5% or so of the users? Thats such a small fraction, and even smaller when you take into account how many of those hits might not even be actual PCs On Aug 14, 10:38 pm, jwmeigs <tippingpi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Sure thing ;-) > > jdalton''s suggestion is probably the best. Have a plain no javascript > section for IE 5.0 users. Also a note on your stats: > > Now I could be wrong, but... I think only 5.0 and 5.5 are relevant to > PC Window Internet Explorer all those others are probably some weird > browser or mobile device. By the way, everyone think developing for > the web is tough cross browser, try the mobile word ! WURFL is a life > saver though > > On Aug 14, 9:26 pm, jdalton <jdalton...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Have a look here:http://wiki.script.aculo.us/scriptaculous/show/SupportedBrowsers > > > IE 5.0 is not supported (It shouldn''t have to be, a lot of stuff in IE > > 5.0 is plain broke beyond repair). > > I would treat the IE 5.0 edge case the same as 508 compliance and make > > a seperate site template that doesn''t rely on javascript or fancy css > > for the IE 5.0 browsers. > > > To Anyone, why doesn''t Prototype have an offical supported browsers > > list?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---