[thelist] Clever way to mix Javascript and VBScript

Rob Smith rob.smith at THERMON.com
Fri Nov 7 10:55:09 CST 2003


Hello,

I know some of you may be saying, "What are you doing mixing those two
languages?! They don't belong together." Yeah I know but here's what I want
to happen:

I have a form and when a user enters an ID number, the field right next to
it shows the name associated to the ID number. Basically, or functionally,
when the field has changed or OnBlur, the javascript would go match that
entry to a possible pre-known set of values and spit the corresponding name
to the field next to it.

:-\ Do you think I could use VBscript to call a known set of values, then
write the code that would write the corresponding JavaScript function. Then
in my field that has the OnChange or OnBlur function, call that function
with "this" as an argument and then have that function reset the next field
to something it matched?

The only problem I have with this is that my array could potentially be
20,000 elements long. Doing a client side search (javascript case
statement), might be taxing on users computers.

Your two cents if you please?

Rob Smith


More information about the thelist mailing list