ASP ot VBScript / VBScript to ASP 
Author Message
 ASP ot VBScript / VBScript to ASP

Hello,

  Does anyone know how to pass value into Session("UserName") inside vb
script tag

i have try

<SCRIPT LANGUAGE=VBScript>
SUB cboCustomerName_OnChange
 "<%Session("CustomerName")%>"  =
Customer.cboCustomerName.value    --------Line 1
 msgbox
                          --------Line 2
END SUB
</SCRIPT>

Line 1 --- return error

Line 2 --- the msgbox display nothing

--
--------------------------------------------------------------
Any suggestions would be appreciated.
Thank You

Khai Mun, Ng



Mon, 09 Jun 2003 11:18:25 GMT  
 ASP ot VBScript / VBScript to ASP
You're mixing apples and oranges...

Or more precisely server side code and client side code.  The distinction
between the two is a pretty fundamental concept.

I'd recommend that you pick up a good book on ASP - Wrox Press publishes
lots of ASP titles and they're all good.

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--


Quote:
> Hello,

>   Does anyone know how to pass value into Session("UserName") inside vb
> script tag

> i have try

> <SCRIPT LANGUAGE=vbscript>
> SUB cboCustomerName_OnChange
>  "<%Session("CustomerName")%>"  =
> Customer.cboCustomerName.value    --------Line 1
>  msgbox
>                           --------Line 2
> END SUB
> </SCRIPT>

> Line 1 --- return error

> Line 2 --- the msgbox display nothing

> --
> --------------------------------------------------------------
> Any suggestions would be appreciated.
> Thank You

> Khai Mun, Ng



Mon, 09 Jun 2003 11:30:37 GMT  
 ASP ot VBScript / VBScript to ASP
I am very sorry, I am confuse about the relationship between ASP to
VBScript, ASP to Javascript or Vbscript to Javascript

<SCRIPT LANGUAGE=vbscript>
SUB cboCustomerName_OnChange
 '"<%Session("CustomerName")%>"  =
frmCustomer.cboCustomerName.value ----------- return ERROR
 msgbox "<=%Session("UserName")%>"        -----------    return NOTHING
END SUB
</SCRIPT>

i just needed to pass    frmCustomer.cboCustomerName.value  into
Session("UserName")

Thank you...........


Quote:
> You're mixing apples and oranges...

> Or more precisely server side code and client side code.  The distinction
> between the two is a pretty fundamental concept.

> I'd recommend that you pick up a good book on ASP - Wrox Press publishes
> lots of ASP titles and they're all good.

> --
> Michael Harris
> Microsoft.MVP.Scripting
> --

> Please do not email questions - post them to the newsgroup instead.
> --



> > Hello,

> >   Does anyone know how to pass value into Session("UserName") inside vb
> > script tag

> > i have try

> > <SCRIPT LANGUAGE=vbscript>
> > SUB cboCustomerName_OnChange
> >  "<%Session("CustomerName")%>"  =
> > Customer.cboCustomerName.value    --------Line 1
> >  msgbox
> >                           --------Line 2
> > END SUB
> > </SCRIPT>

> > Line 1 --- return error

> > Line 2 --- the msgbox display nothing

> > --
> > --------------------------------------------------------------
> > Any suggestions would be appreciated.
> > Thank You

> > Khai Mun, Ng



Mon, 09 Jun 2003 17:48:55 GMT  
 ASP ot VBScript / VBScript to ASP

Anything you put in your <SCRIPT> tag (unless you specifically specify to run on
the server) will run on the CLIENT side.  On the other hand, the .asp "<%="
substitutions will happen on the SERVER side, BEFORE the page is even sent to the
client.

If you want to set Session("CustomerName") to the value of a CLIENT-side form
element value (which it looks like you want), then you need to SUBMIT the form to
an .asp script.

The form would look something like this:

<form methof="post" action="myASP.asp">
 <input type="checkbox" name="cboCustomerName">
 <input type="submit">
</form>

The SEVER-side script myAsp.asp would then do something like this:

<% Session("CustomerName") = Request("cboCustomerName") %>

Quote:
-----Original Message-----

I am very sorry, I am confuse about the relationship between ASP to
VBScript, ASP to Javascript or Vbscript to Javascript

<SCRIPT LANGUAGE=vbscript>
SUB cboCustomerName_OnChange
 '"<%Session("CustomerName")%>"  =
frmCustomer.cboCustomerName.value ----------- return ERROR
 msgbox "<=%Session("UserName")%>"        -----------    return NOTHING
END SUB
</SCRIPT>

i just needed to pass    frmCustomer.cboCustomerName.value  into
Session("UserName")

Thank you...........



> You're mixing apples and oranges...

> Or more precisely server side code and client side code.  The distinction
> between the two is a pretty fundamental concept.

> I'd recommend that you pick up a good book on ASP - Wrox Press publishes
> lots of ASP titles and they're all good.

> --
> Michael Harris
> Microsoft.MVP.Scripting
> --

> Please do not email questions - post them to the newsgroup instead.
> --



> > Hello,

> >   Does anyone know how to pass value into Session("UserName") inside vb
> > script tag

> > i have try

> > <SCRIPT LANGUAGE=vbscript>
> > SUB cboCustomerName_OnChange
> >  "<%Session("CustomerName")%>"  =
> > Customer.cboCustomerName.value    --------Line 1
> >  msgbox
> >                           --------Line 2
> > END SUB
> > </SCRIPT>

> > Line 1 --- return error

> > Line 2 --- the msgbox display nothing

> > --
> > --------------------------------------------------------------
> > Any suggestions would be appreciated.
> > Thank You

> > Khai Mun, Ng

.



Tue, 10 Jun 2003 03:01:25 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Strange behavior of VBscript/WMI into ASP (compared to VBscript/WMI into client-side application)

2. ASP, Word, Client Side vbScript

3. Accesing Outlook from ASP/VBScript

4. Date problem in VBScript / ASP

5. vbscript not working in asp pages

6. OT: Security hole in M$ ASP?

7. OT - Help needed reviewing questions for VBScript test

8. passing javascript variable into asp variable using vbscript

9. command in ASP/VBscript to convert date and time into a Hex code, ASCII code

10. VBScript, ADO, ASP: Yet Another Stupid Newbie Question

11. error doing a FILTER on an Access database via Asp/VBScript and ADO

12. How do I/Can I Create a collection object in vbscript/asp

 

 
Powered by phpBB® Forum Software