VBScript to ASP

T

Tim Johnson

I have an ASP page, on the Window_OnLoad event I use
VbScript to popup an Inputbox to accept a value from the
user and put it into a string called strValue. I then
want to be able to go (in asp) <%Response.Write(strValue)%
- but if I do that nothing happens.

How can I access the Vbscript variable in the ASP part of
the page?

TIA>
 
E

Evertjan.

Tim Johnson wrote on 15 jul 2003 in
microsoft.public.inetserver.asp.general:
I have an ASP page, on the Window_OnLoad event I use
VbScript to popup an Inputbox to accept a value from the
user and put it into a string called strValue. I then
want to be able to go (in asp) <%Response.Write(strValue)%

How can I access the Vbscript variable in the ASP part of
the page?

you cannot

ASP runs on the server and is inaccessable to the clientcode, because ASP
code is finished by that time
 
B

Bob Barrows

Tim said:
I have an ASP page, on the Window_OnLoad event I use
VbScript to popup an Inputbox to accept a value from the
user and put it into a string called strValue. I then
want to be able to go (in asp) <%Response.Write(strValue)%
Why bother? You've used client-side code to get the value: continue to use
client-side code to write the value to the page! You can do this by:
1. setting the innertext property of some element on the page to the value
of the variable
2. using insertadjacenttext to put the value next to an element
3. setting a textbox's value to the variable

You'll be able to get further help with this in a dhtml or client-side
scripting newsgroup.

HTH,
Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top