(Now that I have your attention... :-) Here's the situation: All the navigational buttons in the site I'm working on have three different states (for mousovers--normal, mouseover, onClick). What I don't like: When I mouse over one button, it takes a second or two for the page to fetch the mouseover state of the button from the server. Now, normally, I would just write a preloadimages() function in JavaScript and preload all the button states when the pages load. BUT, this is a little harder, since this is a fairly big site (or will be) and it's not always the same buttons that need to be loaded; they can change from page to page (say, between sections, with subnav bars). That being said, I've kept one thing simple: All the buttons (and their states) are stored in the same directory, and in fact only button images are in that directory ("/nav").
So here's what I would like to know: Is it possible for PHP to read the contents of a directory--all the files--and then take that array and generate some javascript preload() statements? (Of course, I'm sure it IS possible, but I would appreciate any pointers you might have before I undertake it. Maybe there's even a better way than what I can see!) What I was thinking was to preload all the nav buttons and their states in the header.inc. Thanks. ...Rene --- René Fournier [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]