[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

Problem with document.frmuser.action

Asked by kmartin7 in JavaScript

Tags: javascript form submit

I have the following form:

<form id="frmuser" name="frmuser" method="post">
...
<tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="btnTest" id="btnTest" value="Test InputS" /></td>
    </tr>
    <%
      if not IsEmpty(Request.Form("btnTest")) then
            Response.Write("<tr><td colspan=""2"" align=""center"">")
            if TestCaptcha("ASPCAPTCHA", Request.Form("captchacode")) then
                  document.frmuser.action="EmailFriendSendMail.aspx"
                  document.frmuser.submit()
            else
                  Response.Write("<b style=""color:#FF0000"">You entered the wrong code.</b>")
            end if
            Response.Write("</td></tr>" & vbCrLf)
      end if
      %>    
        </table>
      </form>

Whenever I click the submit button, I get the ubiquitous "object required: '' " error. The error specifically is:

document.frmuser.action="EmailFriendSendMail.aspx"

Below is the full code.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
<%@LANGUAGE="VBSCRIPT"%>
<%
Dim dsgn
dsgn = Request.Querystring("dsgn")
function TestCaptcha(byval valSession, byval valCaptcha)
	dim tmpSession
	valSession = Trim(valSession)
	valCaptcha = Trim(valCaptcha)
	if (valSession = vbNullString) or (valCaptcha = vbNullString) then
		TestCaptcha = false
	else
		tmpSession = valSession
		valSession = Trim(Session(valSession))
		Session(tmpSession) = vbNullString
		if valSession = vbNullString then
			TestCaptcha = false
		else
			valCaptcha = Replace(valCaptcha,"i","I")
			if StrComp(valSession,valCaptcha,1) = 0 then
				TestCaptcha = true
			else
				TestCaptcha = false
			end if
		end if		
	end if
end function
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html lang="en">
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Tell A Friend About <%=request("productID")%> (Stock No. <%=request("stock_no")%>) - Holiday World of Houston Online!</title>
<link rel="shortcut icon" href="/hwh.ico" type="image/x-icon">
<style type="text/css" media="screen">
<!--
@import "styles/hwhDefault.css";
-->
</style>
<script type="text/javascript" src="scripts/hwhscripts.js"></script>
<script type="text/JavaScript">
<!--
function ds_LH(){ //1.2 by PVII
 ds_buildNM();
 ds_setRBS(0,'C','L','N',41,30,164,5000,0,656,'Y');
 ds_rowLite('prodtbl','rowLite');
}
function ds_LoadHandler(a){ //1.2 by PVII
 if(a==1||a==3){onload=ds_LH;}if(a>1){onresize=ds_RH;}
}
ds_LoadHandler(1);
//-->
</script>
<script language="javascript">
function RefreshImage(valImageId) {
	var objImage = document.images[valImageId];
	if (objImage == undefined) {
		return;
	}
	var now = new Date();
	objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString();
}
</script>
<!--[if gte IE 5]>
<style>
body {position: relative;}
#dsNMnav1 ul a {height: 1em;}
#dsNMnav1 li {float: left; clear: both; width: 100%;}
#sidebar {position: static !important;}
#artpiece {margin: 0 0 1px 0;}
div.prewrap {font-size: .85em; overflow: auto; overflow-y: hidden;}
#footertext p {width: 724px;}
</style>
<![endif]-->
<!--[if IE 5]>
<style>
body {text-align: center;}
h1, #mainBox, #sidebar, #masthead, #footer {text-align: left;}
#masthead {position: absolute; left: 0; top: 0;}
#skipnav {position: static; text-align: right;}
#iBarWrapper {width: 753px; margin: 0 0 0 9px; text-align: left;}
#mainContent {margin-bottom: 0;}
#layoutWrapper {margin-bottom: 0;}
#vcrcontrols {display: none;}
</style>
<![endif]-->
</head>
<body>
<table width="100%" id="hdr" style="background-image:url(images/header5.jpg); background-repeat:no-repeat;" bgcolor="#FF0000" cellpadding="0" cellspacing="0">
<tr><td height="90"></td><td align="right" style="padding:0 0 0 0;"><img src="images/hwh_logo.png" border="0" /></td></tr>
</table>
<table border="0">
<tr><td valign="top">
<!--#include file="menu.inc"-->
</td>
<td valign="top">
<div id="mainTxt">
<div id="mainContent">
<!-- enter main text here -->
<p>To tell a friend about one of our fantastic deals, please enter a valid email address in the form on the right. If you want to add a special message to the email, you may do so in the text field provided.</p>
<form id="frmuser" name="frmuser" method="post">
      <table border="0" width="100%" cellspacing="0" cellpadding="3" bgcolor="white">
      <input name="datetime" type="hidden" value="<%=date%>, <%=time%>">
      <input name="productID" type="hidden" value="<%=request("productID")%>">
      <input name="stock_no" type="hidden" value="<%=request("stock_no")%>">
	  <input name="price" type="hidden" value="<%=request("price")%>">
	  <input name="lot" type="hidden" value="<%=request("lot")%>">
	  <input name="dsgn" type="hidden" value="<%=request("dsgn")%>">
      <%if request("productID") <> "" then%>
          <tr>
            <td width="93" align="right">Product: </td>
            <td width="423">
            <%=request("productID")%></td>
          </tr>
      <%end if%>
            <%if request("stock_no") <> "" then%>
          <tr>
            <td align="right">Stock No: </td>
            <td width="423">
            <%=request("stock_no")%></td>
          </tr>
		  <tr>
            <td align="right">Link: </td>
            <td width="423">
			<%if dsgn <> "NEW" then%>
            <a href="http://www.holidayworldhouston.com/details2.asp?id=<%=request("stock_no")%>">http://www.holidayworldhouston.com/details2.asp?id=<%=request("stock_no")%></a>
			<%else%>
			<a href="http://www.holidayworldhouston.com/details.asp?id=<%=request("stock_no")%>">http://www.holidayworldhouston.com/details.asp?id=<%=request("stock_no")%></a>
			<%end if%>
			</td>
          </tr>
      <%end if%>
      
          <tr>
            <td align="right">Friend's  Name</td>
            <td width="423">
              <input type="text" name="FrName" size="30" value="Mutt">            </td>
          </tr>
          
         <tr>
            <td align="right">Friend's Email</td>
            <td width="423">
              <input type="text" name="FrEmail" size="30" value="kmartin7@gmail.com">            </td>
          </tr>
		  <tr>
            <td align="right" valign="top">Special Message:</td>
            <td width="423"><textarea name="spMsg" rows=8 cols=60>asfdsf</textarea></td>
          </tr>
		  <tr>
            <td align="right">Your Name</td>
            <td width="423">
              <input type="text" name="SenderName" size="30" value="Kurt">            </td>
          </tr>
		  
		  <tr>
            <td align="right">Your Email</td>
            <td width="423">
              <input type="text" name="SenderEmail" size="30" value="kmartin7@gmail.com">            </td>
          </tr>
		  <tr>
		    <td colspan="2" align="center"><input class="buttons" type="button" onClick="verifyText()" VALUE="Submit!"/></td>
			</tr>
            <tr>
      <td width="261">CAPTCHA Image</td>
      <td width="123"><img id="imgCaptcha" src="captcha.asp" /><br /><a href="javascript:void(0)" onclick="RefreshImage('imgCaptcha')">Change Image</a></td>
    </tr>
    <tr>
      <td>Write the characters in the image above</td>
      <td><input name="captchacode" type="text" id="captchacode" size="10" /></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="btnTest" id="btnTest" value="Test InputS" /></td>
    </tr>
    <%
	if not IsEmpty(Request.Form("btnTest")) then
		Response.Write("<tr><td colspan=""2"" align=""center"">")
		if TestCaptcha("ASPCAPTCHA", Request.Form("captchacode")) then
			document.frmuser.action="EmailFriendSendMail.aspx"
			document.frmuser.submit()
		else
			Response.Write("<b style=""color:#FF0000"">You entered the wrong code.</b>")
		end if
		Response.Write("</td></tr>" & vbCrLf)
	end if
	%>     
        </table>
      </form>
 
 
<!-- end main text here -->
</div>
</div></td>
<!--#include file="ispecs.inc"-->
</tr>
</table>
<!--#include file="footer.inc"-->
</body>
</html>
 
Related Solutions
 
Loading Advertisement...
 
[+][-]07/27/09 07:36 PM, ID: 24957518Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: JavaScript
Tags: javascript form submit
Sign Up Now!
Solution Provided By: cezarF
Participating Experts: 1
Solution Grade: A
 
[+][-]07/28/09 05:02 AM, ID: 24959784Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20090701_SELECT_ZONES