View Full Version : TextBox Question??

03-30-2010, 12:32 PM
I would like to type something into my textbox and then press ENTER, it will execute a function.

I tried onFocus, onChange and onBlur but it doesn't do what I want it to.

Here's an example I use for onChange.

Application: <input type="text" onchange="execProg(0);">

Any comments or suggestions is greatly

03-30-2010, 01:25 PM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<script type="text/javascript">
function Enter(obj){
var e=window.event||arguments.callee.caller.arguments[0];
var kc=e.which?e.which:event.keyCode;
if (kc===13){


Application: <input type="text" onkeypress="Enter(this);">