sets focus into the necessary component
item | string | ID or name of the form element |
//htmlform
<input type="button" value="Focus author" onclick="focus_form('author');" />
<input type="button" value="Focus genre" onclick="focus_form('genre');" />
...
function focus_form(item) {
if (!item)
$$('htmlform1').focus();
else
$$('htmlform1').focus(item);
}
If applied without parameter, the function sets focus on the whole component.