In this instance the relevant form is called 'search_form'. This is specified in the a tag version because it's not an input and as such cannot have submit or reset associated with it.
1
2 <input type="submit" value="Search" onclick="javascript:return text_validate()" />
3 <input type="reset" value="Reset" />
4 <input type="button" value="Show All News" onclick="javascript:return showAll();" title="Show all news button." />
5
6 Could be shown as:
7
8 <a class="blockbutton" title="Search" href="javascript:document.search_form.submit();" onclick="javascript:return text_validate();">Search</a>
9 <a class="blockbutton" title="Reset" href="javascript:document.search_form.reset();">Reset</a>
10 <a class="blockbutton" title="Show All News" href="javascript:showAll();">Show All News</a>
11
Okay, as pointed out by Blonkm this is bad for usability. A better way of doing things would be like this:
1
2 <script type="text/javascript">
3 function doSubmit(){
4 document.getElementById("whatever").submit();
5 return true;
6 }
7 </script>
8
9 <a href="#" onclick="doSubmit();return false;" title="Search">Link</a>
10