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

ASP and Request.Form inside VBScript

Status
Not open for further replies.

Tarbuza

Technical User
Dec 13, 2000
56
US
In the following code, I am not getting the value for scustid inside submit_onClick. How can I get the value for scustid inside submit_onClick? Any helps would be greatly appreciated. Thanks in advance.

<%
Option Explicit
Dim session, db, doc, scustid
scustid=Trim(Request.Form(&quot;fcustid&quot;))
%>
<SCRIPT Language=&quot;VBScript&quot;>
Sub submit_onClick
Set session=CreateObject(&quot;Lotus.NotesSession&quot;)
Call session.Initialize
Set db=session.GetDatabase(&quot;&quot;,&quot;CigTest&quot;)
Set doc=db.CreateDocument()
doc.AppendItemValue &quot;Form&quot;,&quot;Test&quot;
doc.Save False,False
MsgBox scustid,,&quot;Test&quot;
doc.AppendItemValue &quot;custid&quot;,scustid
doc.Save False,False
End Sub
</SCRIPT>
<HTML>
<BODY>
<FORM ACTION=&quot;<%= Request.ServerVariables(&quot;SCRIPT_NAME&quot;) %>&quot; METHOD=&quot;POST&quot;>
<BR>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR VALIGN=top><TD WIDTH=&quot;240&quot;>&nbsp;</TD><TD WIDTH=&quot;340&quot;><DIV ALIGN=center><B><FONT SIZE=6 COLOR=&quot;000080&quot;>Cigna Notes Entry Form</FONT></B></DIV></TD></TR>
</TABLE>
<BR><BR>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR VALIGN=top><TD WIDTH=&quot;186&quot;>Customer Id:</TD><TD WIDTH=&quot;340&quot;>
<INPUT TYPE=&quot;Text&quot; NAME=&quot;fcustid&quot;></TD></TR>

<TR VALIGN=top><TD WIDTH=&quot;186&quot;>Region :</TD><TD WIDTH=&quot;340&quot;>
<INPUT TYPE=&quot;Text&quot; NAME=&quot;fregid&quot;></TD></TR>

<TR VALIGN=top><TD WIDTH=&quot;526&quot; COLSPAN=2>Notes: <BR>

<TEXTAREA NAME=&quot;fnotes&quot; ROWS=7 COLS=50></TEXTAREA>
<BR>
</TD></TR>
</TABLE>
<INPUT TYPE=&quot;Submit&quot; NAME=&quot;submit&quot; vALUE=&quot;Submit&quot;>
</FORM>
</BODY></HTML>
 
You need to specify a value for your textbox:

You wrote:
<INPUT TYPE=&quot;Text&quot; NAME=&quot;fcustid&quot;>
<INPUT TYPE=&quot;Text&quot; NAME=&quot;fregid&quot;>

instead, write:
<input type=&quot;text&quot; name=&quot;fcustid&quot; value=&quot;<< your value >>&quot;>
<input type=&quot;text&quot; name=&quot;fregid&quot; value=&quot;<< your value >>&quot;>

_______________________________
regards,
Brian

AOL IM: FreelanceGaines

AG00280_.gif
 
I think I am not clear in my question. The form appears on the browser. I typed in value for fcustid. There is a submit button which I clicked. It calls submit_onClick function but it does not display the value for fcustid. Is there a way to retireve fcustid value in VBScript different than in ASP. Thanks in advance.
 
Oh, you are wanting client side VBScript?


You need to add a form name to your form tag

You can reference document.<<form name>>.fcustid.value
_______________________________
regards,
Brian

AOL IM: FreelanceGaines

AG00280_.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top