I'm using Safari 5.0.3 I have a form in my html:
<form name="searchForm" style="margin-top:24px;">
<h4 style="float:left;margin-top:-1px;">Search</h4>
<input type="text" name="keywords" id="keywords"></input> <a href="#" onClick="document.forms[0].submit(); return false">Go ></a>
</form>
This works fine:
a href="#" onClick="document.forms[0].submit(); return false"
but this does nothing:
a href="#" onClick="document.forms['searchForm'].submit(); return false"
I need to use the latter, because the page template is dynamic, and sometimes there will be a form in the page before this one.