VBScript to ASP

Discussion in 'ASP General' started by Tim Johnson, Jul 15, 2003.

  1. Tim Johnson

    Tim Johnson Guest

    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>
     
    Tim Johnson, Jul 15, 2003
    #1
    1. Advertising

  2. Tim Johnson

    Evertjan. Guest

    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)%
    >> - but if I do that nothing happens.

    >
    > 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

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Jul 15, 2003
    #2
    1. Advertising

  3. Tim Johnson

    Bob Barrows Guest

    Tim Johnson wrote:
    > 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.

    >

    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
     
    Bob Barrows, Jul 15, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sftwrdvlpr

    ASP, vbscript and Netscape...

    sftwrdvlpr, Jun 25, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    913
    sftwrdvlpr
    Jun 25, 2003
  2. Gabriele Zannoni

    ASP + ASP.NET + VBScript + C#?

    Gabriele Zannoni, Sep 8, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    682
    Marina
    Sep 8, 2004
  3. Roja Doja
    Replies:
    2
    Views:
    3,334
    Roja Doja
    Apr 14, 2005
  4. Joe
    Replies:
    2
    Views:
    422
    Martin Honnen
    Apr 25, 2009
  5. John Davis

    ASP JavaScript versus ASP VBScript

    John Davis, Sep 6, 2003, in forum: ASP General
    Replies:
    5
    Views:
    152
    Curt_C [MVP]
    Sep 7, 2003
Loading...

Share This Page