[Javascript] JS Marquee - Advanced!

Troy III Ajnej trojani2000 at hotmail.com
Wed Aug 9 20:35:38 CDT 2006


Hi Tedd,
sorry for rep delay.
 
> >You've declared Strict DTD while it obviously isn't.> No disrespect intended,...
 
I'm very certain you did not, no need to explain.
 
>... but why isn't it?
 
The omitted script tag declaration, that was reported by validating should've
been reason enough to suspect that other things were omitted too;
Second: There will always be other tiny things that never get reported during
validation. Browsers like FX will not forgive css malformed declaration and 
the whole script will fail. While IE will tolerate css but not malformed javascript.
f.e.:
marginLeft=-i; against: marginLeft=-i+"px"; will bee dropped in FX, while in strict mode.
Although IE will fail completely because of the omitted semicolon after
a variable declaration, especially if other errors are caused by improper
header declarations, like: charset=UTF-8, while mistakenly saving the
document in "US-ASCII". Locally, this misinformation will not cause any problem
but loading it via server is a different story. Declaring "charset" is not very 
vise, even they (validateurs) don't do that.
 
> Your latest code works great "as-is", see:> http://xn--ovg.com/marquee/index5.php
It doesn't on my IE, because of the charset mismatch,
you've accidentally saved it in ASCII!
It will probably work on Mac but not win pc, mainly because of the 
incorrect byte order; big endian, litle endian and other tiresome notions
that we should not bother ourselves with. It's always better to let Server detect it and 
deliver correctly. 
Anyway UTF-8 with BOMark is not that widely supported yet, as they say.
 
> The addition of my BOX doesn't stop it from working, see:> http://xn--ovg.com/marquee/index6.php
Ironically it works in IE too, although you should have modified some
css to make it fit your layout. 'Looks ugly.
 
I've delivered my code in 'status nascendi' in generic mode, external 
modifications will always be needed before publishing.
 
> I shall test both and report back to the list which one works "best" > across several browsers and platforms.
 
That's nice, I think that both codes are good, but I don't like, neither
of them because they both require the finite number of images;
equal width; manually setting the scroll width, etc.
 :   :   :
Yesterday I came to an idea that could solve this problem so everybody
can implement the script with ease for any number of images and any 
size they might have programmatically. If you're interested I will post it.
 
*   *   *
But now I'm thinking to modify some script I wrote for IE some years ago. 
It was able to load any number of (numbered) images from images folder successively
and see if I can make it work on other browsers too. Than perhaps fuse it with this scroller
so it can load all the images found in the folder (give some tolerance) for any missing image,
make them get displayed as they load in place of the previous until the last. Than fill the scroller 
with all the images found and finally start sliding them.
 
This would be perfect for maintaining issues, -because you will never need to go back to the script
in case you decide to add or remove some images. Not to mention the performance improvement
of the page... not to forget the repetitive html <img src='blablabla..., imagine twenty or hundred 
lines of this, all removed as unnecessary!
 
Imagine all of that totaling 1KB of code, - Yeah, that's what I call Code Optimization!!!
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                         Troy III                           progressive art enterprise~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_________________________________________________________________
Try Live.com - your fast, personalized homepage with all the things you care about in one place.
http://www.live.com/getstarted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20060810/b4fef7b4/attachment.htm>


More information about the Javascript mailing list