Search Blog Posts

Posts Tagged ‘onload’

Focusing a specific form field on page load

Thursday, September 25th, 2008

If you require a form field to be set as the focus when the page loads, we can use the onload function to make this possible.

All you need to do is use the code below and replace the FormName and FormField with your elements names and all should work fine.

<body onload="document.FormName.FormField.focus()">

© Copyright 2003-2008 Minimalistic Designs | Terms | Links | Sitemap
Website Design Liskeard - www.minimalistics.co.uk