Link to home
Start Free TrialLog in
Avatar of milani_lucie
milani_lucieFlag for United States of America

asked on

VBScript In IE Issue

I have the following VBScript code on client side which is NOT working in IE. Can you please FIX this ?


<html>

	<head>

		<script type="text/vbscript">

		Sub MethodKeyboard(e)

			If (window.event.keyCode = 13) Then

				window.document.form1.submit()

			End If

		End Sub

		Sub Init()

			window.document.form1.text2.onkeydown = GetRef("MethodKeyboard")

		End Sub

		window.onload = GetRef("Init")

		</script>

	</head>

	<body>

		<form name="form1" action="Submit.asp" method="post">

			<input type="text" name="text1" value="">

			<input type="text" name="text2" value="">

			<input type="button" name="button1" value="Click">

		</form>

	</body>

</html>

Open in new window


Thanks
ASKER CERTIFIED SOLUTION
Avatar of Peter Kwan
Peter Kwan
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of milani_lucie

ASKER

Works Great !