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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing a value from an ActiveX object to a querystring

Status
Not open for further replies.

heprox

IS-IT--Management
Dec 16, 2002
178
0
0
US
I have a set of pages in ASP/javascript. On the first page I have an ActiveX object called "txtData" which consists of a textbox. This object is placed inside of a form. I want to pass the value inside the ActiveX textbox as "txtData" when I submit the form. The querystring will have a value like "/secondpage.asp?txtData=#####". I cant seem to figure out how to get the value in the ActiveX control to pass to submit with the form?
 
Not too sure what the complication is if the text is already in the control itself. Are you passing value in and want a value out as in the following ASP snippet:

Set ObjReference = Server.CreateObject("reglicense.license")
strReturn = objReference.makeCode(fSerial)
Session("regcode") = strReturn

fSerial goes in and strReturn comes out. The VB code for that control is

Private MyScriptingContext As ScriptingContext
Private MyApplication As Application
Private MyRequest As Request
Private MyResponse As Response
Private MyServer As Server
Private MySession As Session

Public mCN As Connection
Public mRS As New Recordset


Private strPropertyProcedure As String




Public Function makeCode(ByVal RHS As String) As String
Dim strCode As String
Dim strJ As String
Dim strK As String
Dim stcode As Long
Dim sttot As String
Dim strSerial As String
Dim strOut As String
Dim strReturnString As String
Dim j As Integer
Dim i As Integer

Dim hh As Long



strOut = "sum stuff"
'///// Send back composed string
makeCode = strOut



End Function


Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
Set MyScriptingContext = PassedScriptingContext
Set MyApplication = MyScriptingContext.Application
Set MyRequest = MyScriptingContext.Request
Set MyResponse = MyScriptingContext.Response
Set MyServer = MyScriptingContext.Server
Set MySession = MyScriptingContext.Session
End Sub

Public Sub OnEndPage()
Set MyScriptingContext = Nothing
Set MyApplication = Nothing
Set MyRequest = Nothing
Set MyResponse = Nothing
Set MyServer = Nothing
Set MySession = Nothing
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top