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 highlt appreciated.

Rosh
 
You can use Remote Scripting -- check out the vbScript forum FAQ section for some information on using it -- basically, it will allow you to call server scripts without actually reloading the page.

Secondly, you could do a reload of the page (submit the form to itself onChange) and redo the other options on each load of the page... I like this method, but it does take alot of behind the scenes work to make it function properly -- because your main form is submitting to itself, you have to keep a second form (completely hidden) running in the background that hold the values of the various elements -- and then your actual submit button is submitting the hidden form rather than the one that the user is interracting with.

Thirdly, you can create several client side arrays holding the various values of the different options -- and onChange of each option, you go through and rebuild the subsequents that depend on them... Depending on how many options you actually have, this method is pretty fast -- but the more options you have, the bigger the arrays, and all the while, you are eating up your users' memory to hold them.

Those are your basic three options. The most complicated is first (due to the special setup it takes to run remote scripting), and the least complicated is last.

hope that helps! :)
Paul Prewett
penny.gif
penny.gif
 
Thanks a lot

I'll try using the remote scripting method
The other two won't work for me.

Rosh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top