Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using ASP Scripts with VBScript

Status
Not open for further replies.

AgentM

MIS
Jun 6, 2001
387
US
Can we call an ASP Sub from a VBScript Function?

Or can we use Server Level variables in VBScript function?

Here's what I am trying to do?
there's a onchange event on a text box.
When the data in the txt box changes, the txtbox value is passed as a parameter to a SQL statement.
The reultset values are used to fill other txt boxes.
How can this be done?

Any help highly appreciated.

Rosh
 
Try this:
---------------------------

<html>
<head><title> OnChange Event </title>
<script language=&quot;javascript&quot;>
<!--
function doChange(info){
document.form.valone.value = &quot;You typed: &quot; + info
document.form.valtwo.value = &quot;What year is your &quot; + info + &quot;?&quot;
document.form.valthree.value = &quot;Your &quot; + info + &quot; is cool!&quot;
}
// -->
</script>
<style>
<!--
#txt {width:15em;}
-->
</style>
</head>
<body bgcolor='white' text='black'>

<form name='form' method='post' action='page2.asp'>
What type of car do you have?<BR>
<input type='text' name='initialValue' onKeyUp='doChange(document.form.initialValue.value)'><BR><BR><BR>

Val One: <input type='text' name='valone' id='txt'><BR>
Val Two: <input type='text' name='valtwo' id='txt'><BR>
Val Three: <input type='text' name='valthree' id='txt'><BR><BR><BR>

<input type='submit' value='Submit'><input type='reset' value='Reset'>
</form>


</body>
</html>


Hope this helps!
-Ovatvvon :-Q
 
You don't need .asp for this. You don't need to use an .asp page for this. Just simple Javascript.
Hope that's what you were looking for.

-Ovatvvon :-Q
 
That's Cool
But how will you connect to the database??
Rosh
 
you want it to auto insert all the text boxes into the database every time someone changes the input to the first box?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top