Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Type Mismatch error

Status
Not open for further replies.

99Chuck99

Programmer
Dec 11, 2003
67
US
Trying to write data to cookie so that I can pass parameter to next page. Errors at setVariable. strParm_1 is a text field and pID is numeric. I've included the sub that is called from setVariable. Any help would be greatly appriciated, thanks in advance.

<SCRIPT language=vbscript event=Current(info) for=MSODSC>
Dim pID
Dim URL
Const strParm_1 = "KEYID"

URL = "Parameters_Results.htm"

pID = key_id.value

setVariable strParm_1, pID

window.navigate(URL)
</SCRIPT>



<SCRIPT language=VBScript>
OPTION EXPLICIT
Dim NOT_FOUND
NOT_FOUND = "NOT_FOUND"

Sub SetVariable(strVariableName, varVariableValue)
Document.Cookie = strVariableName & "=" & varVariableValue
End Sub

Sub KillVariable(strVariableName)
SetVariable strVariableName, "NULL;expires=Monday, _
01-Jan-95 12:00:00 GMT"
End Sub
</script>
 
have you tried examining pID to see what's really in it?
Have you tried making strParm_1 a variable instead of a constant?
Have you tried setting the cookie directly from the upper script once to see if that works?

[COLOR=#aa88aa black]Cum catapultae proscriptae erunt tum soli proscript catapultas habebunt.[/color]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top