
How To - Pass the content of a variable on one page to another page
I'm passing the QueryString like this in index.html.
WordFile = "G2" & ComboBox2.Value & ".txt"
File2OPen = "./index_merlin.asp?wordfile=" & WordFile
The url it sends is what I expect,
http://iis/spelltest/index_merlin.asp?wordfile=G2week27.txt
I'm able to access the QueryString value like this
<%
Response.Write(Request.QueryString("wordfile"))
%>
So I thought I'd be able to access the value in index_merlin.asp like;
<%
WordFile = Request.QueryString("wordfile")
%>
but passing it to my ActiveX TDC doesn't seem to be working.
WordList.DATAUrl = WordFile
The value for WordFile doesn't seem to be passing to my Parameter
WordList.DATAUrl.
WordList is the Tabular DataControl. Is the Active Server variable WordFile
different from the VBScript variable I've dimensioned? If so, how do I get
the value of WordFile from my Request.QueryString to my TDC?
<!DOCTYPE HTML PUBLIC "-//W3C//DTDD HTML 3.2//EN">
<html>
<head>
<link REL="STYLESHEET" HREF="./common/spelltest.css" TYPE="text/css">
<title>Spelling Test Practice Game</title>
<!-- The Tabular Data Control -->
<OBJECT ID="Wordlist" WIDTH=0 HEIGHT=0 BORDER="0"
CLASSID="CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83">
<PARAM NAME="UseHeader" VALUE="False">
<PARAM NAME="FieldDelim" VALUE="~">
</OBJECT>
<body>
<center>
<object CLASSID="clsid:99B42120-6EC7-11CF-A6C7-00AA00A47DD2" ID="lbl1"
HEIGHT="190" WIDTH="350">
<param NAME="Angle" VALUE="0">
<param NAME="ForeColor" Value="#0000FF">
<param NAME="BackColor" Value="#000000">
<param NAME="Caption">
<param NAME="FontName" Value="Arial Black">
<param NAME="FontSize" Value="20">
<param NAME="Visible" Value="True">
</object>
</center>
<OBJECT ID="Agent" width=0 height=0
CLASSID="CLSID:F5BE8BD2-7DE6-11D0-91FE-00C04FD701A5"
CODEBASE="http://activex.microsoft.com/controls/agent/msagent.exe#VERSION=1,
5,0,0">
</OBJECT>
<OBJECT ID="TruVoice" width=0 height=0
CLASSID="CLSID:B8F2846E-CE36-11D0-AC83-00C04FD97575"
CODEBASE="http://activex.microsoft.com/controls/agent/cgram.exe#VERSION=1,5,
0,0">
</OBJECT>
<SCRIPT LANGUAGE = VBSCRIPT>
<!--
Option Explicit
Public WordFile
Dim Merlin
Dim LoadRequest(1)
Dim GetRequest(8)
Dim MerlinRequest
Dim DatapathType
Dim CenterX, CenterY
Dim TimerID
<%
WordFile = Request.QueryString("wordfile")
%>
WordList.DATAUrl = WordFile
Sub window_onload
On error resume next
DatapathType = "UNC" ' set to UNC or URL depending on where character data
resides
CenterX = 320
CenterY = 240
Agent.Connected = True ' May be needed in some contexts
Wordlist.Recordset.MoveFirst
lbl1.Caption = "Grade " & Wordlist.Recordset.Fields(0).Value & " - Week "
& Wordlist.Recordset.Fields(1).Value
LoadMerlin
End Sub
Lee Rogowski
The best way to acheive persistance is through Active Server Pages.
If this is not an option, however, you could pass the variable as a
query string to the next page.
window.navigate "./index_test.htm?" & ComboBox2.value
Then, in index_test.htm, you can parse the value from location.search
----------------------------------
John T. Spivey
Purdue University Cytometry Labs - Bioscope Initiative