BRamburn Posted October 13, 2006 Share Posted October 13, 2006 I mostly use script.aculo.us for my projects that go within IPB.But the only problem that I see whenever I try to fix IPB's js to work with script.aculo.us is the way IPB use for() functionSomehow if I turn all the:for(var i in ips_xxx) to for(var i=0; i < ips_xxx.length;i++) AND typeof to using typeof with brackets: typeof(xx)makes most of script.aculo.us work.why not use for() completely and use typeof with brackets?I think that quite a lot of people would be interested in using script.aculo.us on their ipb 2.2 board.Basically I am asking that the JS should be well formatted so that other javascript plugins cannot interfere with the IPB jscripts.thanks Link to comment Share on other sites More sharing options...
Management Matt Posted October 16, 2006 Management Share Posted October 16, 2006 why not use for() completely and use typeof with brackets?I'm really resisting the urge to say "Because we don't want to".Obviously, such a facetious response is much less than professional. We don't really want to change a lot of our working JS to enable mods to work with IPB - it really should be the other way around. We have good reason to use the "for( var i in array )" construct as we use JSON to maintain hash tables and hash indexes which would be more complex to use in an index looping format as you suggest. Link to comment Share on other sites More sharing options...
BRamburn Posted October 16, 2006 Share Posted October 16, 2006 I'm really resisting the urge to say "Because we don't want to".Obviously, such a facetious response is much less than professional. We don't really want to change a lot of our working JS to enable mods to work with IPB - it really should be the other way around. We have good reason to use the "for( var i in array )" construct as we use JSON to maintain hash tables and hash indexes which would be more complex to use in an index looping format as you suggest.Ok then I'll just have to live with it.BTW why are most of the js script on one line?thanks Link to comment Share on other sites More sharing options...
Rikki Posted October 16, 2006 Share Posted October 16, 2006 The Javascript files are compressed so that they are as small as possible when they're downloaded by browsers :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.