daniel_c
asked on
Get Session Value from VBScript
I have two web pages. The first one is the web page where I store the values in session using ASP.
The second page is the web page where I want to retrieve the session values I stored in first page using VBSCRIPT.
How to do this?
* This is the first program:
<HTML>
<HEAD>
<TITLE>Product Sales Inquiry</TITLE>
</HEAD>
<BODY>
<TABLE cellpadding="0" cellspacing="2" border="0" WIDTH="100%">
<TR>
<TD>
<!-- This for Call the Second Web Page -->
<A HREF="grp_product_sales.as p" CLASS="ClsTable">View Graphics</A>
</td>
</tr>
</TABLE>
<%
Session("month01") = 1
Session("month02") = 2
Session("month03") = 3
Session("month04") = 4
Session("month05") = 5
Session("month06") = 6
Session("month07") = 7
Session("month08") = 8
Session("month09") = 9
Session("month10") = 10
Session("month11") = 11
Session("month12") = 12
%>
</BODY>
</HTML>
* This is the second program:
<HTML>
<HEAD>
<TITLE>Graph for Product Sales</TITLE>
<LINK REL=STYLESHEET HREF="stylesheet/ste1.css" TYPE="text/css">
</HEAD>
<SCRIPT LANGUAGE="VBScript">
SUB FillChart
With TChart1
' ---------- Setting up Header ----------
.Header.Text.Clear
.Header.Text.Add "Product Sales Analysis Chart"
.Header.Text.Add "2000"
.Header.Font.Name = "Verdana"
.Header.Font.Size = 12
.Header.Font.Bold = True
.Header.Font.Color= vbYellow
with .Panel.Gradient
.Visible = True
.StartColor = vbWhite
.EndColor = vbBlue
.Direction = gdLeftRight
end with
.Environment.IEPrintWithPa ge=True
' ---------- Setting up Graphics Type ----------
.AddSeries( 1 )
' ---------- Setting up Graphics Content ----------
' *** I CAN'T GET SESSION VALUES ***
.Series(0).Clear
.Series(0).Add <%=Session(month01)%>, "January", RGB(255,0,0)
.Series(0).Add <%=Session(month02)%>, "February", RGB(0,255,0)
.Series(0).Add <%=Session(month03)%>, "March", RGB(255,255,0)
.Series(0).Add <%=Session(month04)%>, "April", RGB(255,0,0)
.Series(0).Add <%=Session(month05)%>, "May", RGB(0,255,0)
.Series(0).Add <%=Session(month06)%>, "June", RGB(255,255,0)
.Series(0).Add <%=Session(month07)%>, "July", RGB(255,0,0)
.Series(0).Add <%=Session(month08)%>, "August", RGB(0,255,0)
.Series(0).Add <%=Session(month09)%>, "September", RGB(255,255,0)
.Series(0).Add <%=Session(month10)%>, "October", RGB(255,0,0)
.Series(0).Add <%=Session(month11)%>, "November", RGB(0,255,0)
.Series(0).Add <%=Session(month12)%>, "December", RGB(255,255,0)
End With
END SUB
</SCRIPT>
<BODY OnLoad="FillChart">
<CENTER>
<!-------------------- OBJECT DECLARATION -------------------->
<OBJECT
classid="clsid:008BBE7E-C0 96-11D0-B4 E3-00A0C90 1D681"
id=TChart1
TYPE="application/x-oleobj ect"
width=600
height=300
align=center
hspace=0
vspace=0
>
</OBJECT>
<BR><BR>
<FORM Name="form1">
<INPUT TYPE=hidden NAME=txtMonth01 VALUE=<%=Session(month01)% >>
<INPUT TYPE=hidden NAME=txtMonth02 VALUE=<%=Session(month02)% >>
<INPUT TYPE=hidden NAME=txtMonth03 VALUE=<%=Session(month03)% >>
<INPUT TYPE=hidden NAME=txtMonth04 VALUE=<%=Session(month04)% >>
<INPUT TYPE=hidden NAME=txtMonth05 VALUE=<%=Session(month05)% >>
<INPUT TYPE=hidden NAME=txtMonth06 VALUE=<%=Session(month06)% >>
<INPUT TYPE=hidden NAME=txtMonth07 VALUE=<%=Session(month07)% >>
<INPUT TYPE=hidden NAME=txtMonth08 VALUE=<%=Session(month08)% >>
<INPUT TYPE=hidden NAME=txtMonth09 VALUE=<%=Session(month09)% >>
<INPUT TYPE=hidden NAME=txtMonth10 VALUE=<%=Session(month10)% >>
<INPUT TYPE=hidden NAME=txtMonth11 VALUE=<%=Session(month11)% >>
<INPUT TYPE=hidden NAME=txtMonth12 VALUE=<%=Session(month12)% >>
</FORM>
<A HREF="Javascript:history.g o(-1)" CLASS=ClsTable>Back</A>
</CENTER>
</BODY>
</HTML>
Need experts help for this...
Daniel
The second page is the web page where I want to retrieve the session values I stored in first page using VBSCRIPT.
How to do this?
* This is the first program:
<HTML>
<HEAD>
<TITLE>Product Sales Inquiry</TITLE>
</HEAD>
<BODY>
<TABLE cellpadding="0" cellspacing="2" border="0" WIDTH="100%">
<TR>
<TD>
<!-- This for Call the Second Web Page -->
<A HREF="grp_product_sales.as
</td>
</tr>
</TABLE>
<%
Session("month01") = 1
Session("month02") = 2
Session("month03") = 3
Session("month04") = 4
Session("month05") = 5
Session("month06") = 6
Session("month07") = 7
Session("month08") = 8
Session("month09") = 9
Session("month10") = 10
Session("month11") = 11
Session("month12") = 12
%>
</BODY>
</HTML>
* This is the second program:
<HTML>
<HEAD>
<TITLE>Graph for Product Sales</TITLE>
<LINK REL=STYLESHEET HREF="stylesheet/ste1.css"
</HEAD>
<SCRIPT LANGUAGE="VBScript">
SUB FillChart
With TChart1
' ---------- Setting up Header ----------
.Header.Text.Clear
.Header.Text.Add "Product Sales Analysis Chart"
.Header.Text.Add "2000"
.Header.Font.Name = "Verdana"
.Header.Font.Size = 12
.Header.Font.Bold = True
.Header.Font.Color= vbYellow
with .Panel.Gradient
.Visible = True
.StartColor = vbWhite
.EndColor = vbBlue
.Direction = gdLeftRight
end with
.Environment.IEPrintWithPa
' ---------- Setting up Graphics Type ----------
.AddSeries( 1 )
' ---------- Setting up Graphics Content ----------
' *** I CAN'T GET SESSION VALUES ***
.Series(0).Clear
.Series(0).Add <%=Session(month01)%>, "January", RGB(255,0,0)
.Series(0).Add <%=Session(month02)%>, "February", RGB(0,255,0)
.Series(0).Add <%=Session(month03)%>, "March", RGB(255,255,0)
.Series(0).Add <%=Session(month04)%>, "April", RGB(255,0,0)
.Series(0).Add <%=Session(month05)%>, "May", RGB(0,255,0)
.Series(0).Add <%=Session(month06)%>, "June", RGB(255,255,0)
.Series(0).Add <%=Session(month07)%>, "July", RGB(255,0,0)
.Series(0).Add <%=Session(month08)%>, "August", RGB(0,255,0)
.Series(0).Add <%=Session(month09)%>, "September", RGB(255,255,0)
.Series(0).Add <%=Session(month10)%>, "October", RGB(255,0,0)
.Series(0).Add <%=Session(month11)%>, "November", RGB(0,255,0)
.Series(0).Add <%=Session(month12)%>, "December", RGB(255,255,0)
End With
END SUB
</SCRIPT>
<BODY OnLoad="FillChart">
<CENTER>
<!-------------------- OBJECT DECLARATION -------------------->
<OBJECT
classid="clsid:008BBE7E-C0
id=TChart1
TYPE="application/x-oleobj
width=600
height=300
align=center
hspace=0
vspace=0
>
</OBJECT>
<BR><BR>
<FORM Name="form1">
<INPUT TYPE=hidden NAME=txtMonth01 VALUE=<%=Session(month01)%
<INPUT TYPE=hidden NAME=txtMonth02 VALUE=<%=Session(month02)%
<INPUT TYPE=hidden NAME=txtMonth03 VALUE=<%=Session(month03)%
<INPUT TYPE=hidden NAME=txtMonth04 VALUE=<%=Session(month04)%
<INPUT TYPE=hidden NAME=txtMonth05 VALUE=<%=Session(month05)%
<INPUT TYPE=hidden NAME=txtMonth06 VALUE=<%=Session(month06)%
<INPUT TYPE=hidden NAME=txtMonth07 VALUE=<%=Session(month07)%
<INPUT TYPE=hidden NAME=txtMonth08 VALUE=<%=Session(month08)%
<INPUT TYPE=hidden NAME=txtMonth09 VALUE=<%=Session(month09)%
<INPUT TYPE=hidden NAME=txtMonth10 VALUE=<%=Session(month10)%
<INPUT TYPE=hidden NAME=txtMonth11 VALUE=<%=Session(month11)%
<INPUT TYPE=hidden NAME=txtMonth12 VALUE=<%=Session(month12)%
</FORM>
<A HREF="Javascript:history.g
</CENTER>
</BODY>
</HTML>
Need experts help for this...
Daniel
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Nice to help you.
xabi
PS: Points?
xabi
PS: Points?
ASKER
See how careless I was... ;-)