OnfocusOut/onlick() in javascript

theartha
theartha used Ask the Experts™
on
Hi There,

I have a question regarding onFocusOut/Onclick in javascript.

I have an onclick function, which works fine when I clicked the button after entering the values in the fields and display the results.

Now,
How can I call the onlclick function when my focus is out from the input fields.?

Instead of writing new events for onfocusout, I want to simulate the onClick function by losing the focus(without clicking the button) to display the results.

any clues?

Thanks!

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Systems architect
Top Expert 2006
Commented:
Check this:


<html>
<head>
<title>Zvonko &#42;</title>
</head>
<body>
<form>
<input type="text" name="myText" onBlur="this.form.myButton.click()" >
<input type="button" name="myButton" value="Show" onClick="alert(this.form.myText.value)" >
</form>
</body>
</html>

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial