Cross Browser Gradient from SlayerOffice
I recently ran into an interesting issue with the cross browser gradient background script from SlayerOffice, in conjunction with qForms and FireFox. I noticed that none of my forms were submitting in FireFox, and it almost appeared as if the form fields weren't there.
#1 - Issue with the gradient script:
On line 34 of gradient.js, for(i=0;i<objArray.length;i++) needs to look like for(var i=0;i<objArray.length;i++) because the variable i is also being used in getGradientObjects().
Oddly enough, this was only causing a problem in FireFox 2.0, and not IE 7. I've sent the updated code to Steve at SlayerOffice so you should probably be able to get the updated code straight from http://slayeroffice.com/code/gradient/, but feel free to contact me if that's not the case.
#2 - Issue with qForms not loading:
Secondly, qForms was simply not working whatsoever. If someone else hadn't reported this problem, I would have reinstalled FireFox, that's how odd it seemed. On each page, I simply called qFormsInit() at the bottom of the page to kick off initializing qForms. This was occurring before the gradient background was applied, and therefore all of the form references in qForms were being blown away.
Instead, whenever code needs to be called upon page load, the following function seems flawless and works like a charm.
window.addEventListener?window.addEventListener("load",qFormsInit,false):window.attachEvent("onload",qFormsInit);
Check out the gradient script from SlayerOffice, it's fairly handy.
If you haven't heard of qForms, I would highly recommend checking out what Dan Switzer has developed, it's one of the best and most used JavaScript API's on the web.