access key + value in hash or arraySOFTWARE: javascriptfor (var i in myArray) { alert('key is: ' + i + ', value is: ' + myArray[i]); Awesome stuff from http://www.mojavelinux.com/articles/javascript_hashes.html
You can also set up an array with this handy syntax:
Note that if you space it and leave a trailing comma after the last entry, IE7 will choke. MORE INFO: http://www.mojavelinux.com/articles/javascript_hashes.htmlApply Focus to SomethingYou can apply focus on page load with this added inside the opening BODY tag:onLoad="self.focus();document.Name_Of_Form.Name_Of_Field.focus()"but if you're working with templates and your BODY tag is in the template and you don't want that JS on every page, you can just add your JS directly to a page by placing directly AFTER the element you're working with: [form is here] then...<script type="text/javascript"> function applyfocus() { self.focus();document.Name_Of_Form.Name_Of_Field.focus(); } applyfocus();</script> |