jQuery Tutorials
Been brushing up on my jQuery. Here are some GREAT tutorials that take things from scratch…
USB Drive Autorun
I have been hunting for a good way to get a USB Flash Drive to autorun when inserted into a computer. The ideal solution would work just as a CD’s autorun (ie work with all versions of Windows and MacOS). Given my time constraint I was only able to locate a solution that works 100% with Windows Vista.
If anyone has a link to the Holy Grail of USB Flash Drive Autorun please comment below :)
Here is what I used
(used it to autorun a Flash Windows Projector file):
Create an Autorun.inf file and place it at the root of your flash drive along with your program files.
[AutoRun] OPEN=YourProgram.exe ICON=YourProgramFileWithIcon.exe ACTION=Message that is displayed LABEL=Drive Label
Here is the link where most the info I used was found.
Javascript and Querystring Variables
In web browsers you can access the querystring with client-side JavaScript, but there is no standard way to parse out the name/value pairs. Andrew Urquhart from andrewu.co.uk has come up with a very useful Javascript (CSJSRequestObject) that mimics ASP’s server-side Request.QueryString() command.
HTMLFormElement is Undefined in IE (Prototype and Mootools)
If you are utilizing both Prototype (which is used with Scriptaculous) and Mootools on your website and run accross this javascript error “HTMLFormElement is Undefined” there appears to be some sort of conflict when you use both these frameworks together. This appears to only be an issue in IE? Firefox had no problems including both in my example. I worked around it by using an if statement and only loading the javascript framework needed. If anyone has a workaround for using both on one page without errors I would love to see it!
PHP: Sessions vs Cookies
HTTP is a stateless protocol, which means that as soon as a page has been sent to the client and the connection is closed any data that has been stored is lost. As a PHP Developer, you often need a way of storing information across multiple pages of your website. The potential uses for this are many. A few examples would be tracking if a user has logged in or perhaps remembering previously set preferences for custom user pages. The common way of accomplishing this via PHP is with sessions and cookies.