I wrote code for a scramble word game and I am trying to set focus everytimge I click on check button..I've got it so it will set focus when I start game, but whenever I put put setFocus() on the onclick of the button it will not work...
is there any way the I can have two procedures for onclick...like

<input id="inbox" type="text" /><input type="button" value="check" onclick="guess()" "setFocus()"/>

I also want to selectall if the word is incorrect

not sure how to go about doing this..I did research on this problem, but they all give me examples on applying just one thing to the onclick not two..
thank you


Javscript written in an HTML onclick/onchange/onblur etc. is nothing more than the contents of an anonymous function. Therefore, simply separate statements with semicolons.

<... onclick="guess(); setFocus();" ...>


That fixed my problem of focus,,but the select all didn't work...here is how I coded a funtion for select all and I also put it in the onclick of the button as

function selectAll()
			}// set select all to the text box

Answered my own question..thank you for your help

It was that I put selectAll in my function instead of select..

function selectAll()
            }// set select all to the text box