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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Client Side to Server Side

Status
Not open for further replies.

Esoteric

ISP
Feb 10, 2001
93
US
How can I get a variable from Client Side to Server side in VBscript?

Here is a sample:

<BODY>
<SCRIPT LANGUAGE=&quot;VBScript&quot;>
dim srresults(100,3)
dim resultct
dim i
dim fr
</SCRIPT>
<SCRIPT LANGUAGE='VBScript' SRC=srscript.exe?Type=2&Origin=49318&Destination=49505&Weight=8&Mode=ALL&ShipDate=05/01/01'></SCRIPT>
<SCRIPT LANGUAGE=&quot;VBScript&quot;>
if resultct > 0 then
for i = 1 to resultct
fr = fr + formatnumber(srresults(1-1,2),2)*1
next
end if
document.writeln formatcurrency(fr/1000,2)
<%
Set fs = CreateObject(&quot;Scripting.FileSystemObject&quot;)
Set a = fs.CreateTextFile(&quot;D:\temp\frieght.txt&quot;, True)
a.Writeline(&quot;&quot;)
a.close %>
</SCRIPT>
 
There's a FAQ in the VBScript section about communicating between the two. Short of remote scripting, you can't do it without reloading the page and making another round trip to the server, but the FAQ explains it better than that.

good luck! :)
Paul Prewett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top