Click to See Complete Forum and Search --> : Need help urgently !! html and Java script


mce16
May 7th, 2002, 11:19 PM
I want to submit a value that i obtained from Javascript from a html page: It looks something as follow:

<SCRIPT LANGUAGE="JScript">
function VerifyUser(var value)
{
**AXSample is an activeX, so the following call
**will return an integer/string to value
value=AXSample.VerifyMatch();
);

}
</SCRIPT>

<FORM ACTION="http://..../test.asp" METHOD=GET>
<input type=button value="Verify" ONCLICK=VerifyUser(sendBack)>
<input type=hidden value=sendBack name=result>
</FORM>



There are some bugs in the code above and i don't know how to correct it. Following describe what i want.
VerifyUser is a button that will do user verification upon user's click. The Java script will then call to VerifyMatch(a working activeX control) and return a result value in Java script. And i want to send this value obtained from the VerifyUser java script back to the server.

Please help me!!

SButler
May 15th, 2002, 09:09 AM
Do you still require help with this?

websmith99
October 15th, 2002, 12:50 AM
Not exactly clear what you are trying to do, but look at this:

<html>
<head>
<script language="JavaScript" type="text/javascript">
function VerifyUser(userValue)
{
**AXSample is an activeX
if (userValue==AXSample.VerifyMatch()) {
document.forms['myForm'].validUser.value="true";
} else {
document.forms['myForm'].validUser.value="false";
}
document.forms['myForm'].result.value = userValue;
}
</script>
</head>
<body>
<form name="myForm" action="http://..../test.asp" method="post">
<input type="hidden" name="result" value="<dynamic value>" />
<input type="hidden" name="validUser" value="" />
<input type="button" value="Verify" onclick="VerifyUser(document.forms['myForm'].result.value)" />
</form>
</body>
</html>