Advertisement

07.17.2008 at 07:26PM PDT, ID: 23575617
[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!

9.4

Validation of values using ColdFusion, JavaScript

Asked by bella7 in ColdFusion Application Server, ColdFusion Studio, JScript

Tags: ,

Hi,  am describing part of Return Authorization process. There are two screens that I am dealing with: on the first one I display a drop down list with contract numbers; after picking a number and submitting a page it takes me to the second screen that collects info about this contract, which is partially existing and partially they type in. Each contract can have several item numbers to return, but I only worry about displaying four. I am displaying four drop down boxes with all available items, after they select an item, they have to input the quantity that they want to return. This field is quantity and I need to make sure that they won't enter more then original order has. Is there Java script that I can use to validate this number? How will I know that next quantity applyes to next randomly picked item number? How can I make sure that they wount select same item twice? I am attaching a code piece, please help.Start Free Trial
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:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
<cfquery name="GetUser" datasource="#request.#">
	
	SELECT * FROM dealers WHERE loginname = '#templogin#'
	
</cfquery>
 
<cfquery name="Get_Item_No" datasource="#request.#">
 
SELECT     HEADER.Rental_No, HEADER.Doc_Type, HEADER.Insert_Date, LINE.No,LINE.Quantity
FROM         HEADER INNER JOIN
                      LINE ON HEADER.Doc_Type = LINE.Doc_Type AND HEADER.Rental_No = LINE.Doc_No
WHERE     (HEADER.Doc_Type = 2) AND (LEFT(LTRIM(RTRIM(SPC_Service)), 3) = '#GetUser.dealer_number#') and Rental_No='#ocontractnumber#'
 
</cfquery>
 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 
<html>
 
<head>
	<title><cfoutput query="GetUser">Welcome #name# (Dealer Number: 2)</cfoutput></title>
</head>
 
<body bgcolor="#000000">
<table width="800" cellspacing="0" cellpadding="0" border="0">
 
<TR>
<TD bgColor=#737373 colSpan=2 height=10 width=600>
 
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left">
<cfoutput query="GetUser">
<font size="1" face="arial" color="white">&nbsp;#name# (Dealer Number: 2)
</font>
</cfoutput>
</td>
<td align="right">
<font face="arial" size="1" color="white">
	<cfoutput>#DateFormat(now(), "dddd")#, #DateFormat(now(), "mmmm d, yyyy")#</cfoutput>&nbsp;&nbsp;
</font>
</td>
</tr>
</table>
 
 
</TD>
<TD bgColor=#303030 height=10 width=200>&nbsp;
</TD>
</TR>
 
 
<tr>
    <td rowspan="2" width="150" valign="top" align="center" bgColor="#F03450">
	<!------BEGINNING OF MAIN VIEWING WINDOW----->
  <TABLE border=0 cellPadding=10 cellSpacing=0 width="100%">
 
<TR>
<TD>
<!-- information starts here -->
<font size="3" face="arial"><b>Return Authorization (RA) Request For -  
<font color="#FF0000">
<cfoutput>#ocontractnumber#</cfoutput></font><p>
</b></font>
<p />
 
 
 
<cfform action="send_mail_ranumber.cfm" method="POST">
	  <table border="0" cellpadding="5" cellspacing="0">
	  
		<tr>
          <td COLSPAN="2" align="left"> 
		  <b><font COLOR="#0C5782">#1) Background Info
		  <hr width="100%" noshade color="#0C5782">
          </font></b>
		  </td> 
        </tr>
		
		<tr>
          <td align="left"><font face="arial" size="2">Urgent?:</font></td>
          <td align="left">
		  <cfselect name="urgency" multiple="No" required="Yes" size="1">
		<OPTION value="Urgent">Urgent</OPTION>
		<OPTION value="Standard" selected>Standard</OPTION>  
		  </cfselect>
		  </td>
        </tr>
				
		<tr>
          <td align="left"><font face="arial" size="2">Product Type:</font></td>
          <td align="left">
		  <cfselect name="prodreturning" multiple="No" required="Yes" size="1">
		<OPTION value="supplies">Supplies</OPTION>
		<OPTION value="parts">Parts</OPTION>
		<OPTION value="equipment">Equipment</OPTION>  
		  </cfselect>
		  </td>
        </tr>
		
		<tr>
          <td align="left"><cfoutput query="GetUser">
		  <input name="building_number" type="Hidden" value="#building_number#">
		  <input name="street" type="Hidden" value="#street#">
		  <input name="city" type="Hidden" value="#city#">
		  <input name="state" type="Hidden" value="#state#">
		  <input name="co_zipcode" type="Hidden" value="#co_zipcode#">
		  <input name="dealernumber" type="Hidden" value="#dealer_number#">
		  <input name="dealernumber_nav" type="Hidden" value="#dealer_number_nav#">          
		  <input name="Name" type="Hidden" value="#contact_fn# #contact_ln#">
		  <input name="Company" type="Hidden" value="#name#">
		  <input name="Phone" type="Hidden" value="#phone#">
		  <input name="Fax" type="Hidden" value="#fax#">
		  <input name="Email" type="Hidden" value="#email#">		  
		  <input name="rocn" type="Hidden" value="FP will enter this info">
		  <input name="doro" type="Hidden" value="FP will enter this info">
		  <input name="roin" type="Hidden" value="FP will enter this info">
		  <input name="roiq" type="Hidden" value="FP will enter this info"> 
		  </cfoutput>
          <cfoutput query="Get_Item_No">
		  <input name="ocontractnumber" type="Hidden" value="#Rental_No#">
		  <input name="Quantity" type="Hidden" value="#Quantity#">          
          </cfoutput>          
		  </td>
        </tr>
		
		<tr>
          <td align="left"><font face="arial" size="2">Original Order Date</font></td>
          <td><cfoutput query="Get_Item_No" maxrows="1">
		  <cfinput name="oodate" type="text" size="10" maxlength="47" required="Yes" value="#DateFormat(Insert_Date)#" readonly="yes"> (mm/dd/yy)
          </cfoutput>
		  </td>
		</tr>
		<tr>
          <td align="left"><font face="arial" size="2">Installation Date</font></td>
          <td>
		  <cfinput name="idate" type="text" size="10" maxlength="47" required="Yes" message="Please Enter the Installation Date as mm/dd/yy.  Enter 11/11/11 if not known." validate="date"> (mm/dd/yy)
		  </td>
		</tr>	
					
		<tr>
          <td COLSPAN="2" align="left"> 
		  <b>
		  <font COLOR="#0C5782">
		  #2) Returned Product Information 
		  <hr width="100%" noshade color="#0C5782">
          </font>
		  </b>
		  </td> 
        </tr>
		
	<tr>
    <td colspan="2">
		
	<table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
 
<!---THIS IS THE PART WHERE I NEED HELP! EACH ITEM SHOULD ONLY BE PICKED ONCE AND QUANTITY SHOULD MATCH THE ITEM --->
 
	<td><font face="arial" size="2">Item#1:</font> 	
	<cfselect query="Get_Item_No" name="itemnumber1" value="No" size="1" multiple="No">
    <OPTION value="" selected></OPTION>
    </cfselect>
    	
	</td>
	<td><font face="arial" size="2">Quantity:</font> <cfinput name="quantity1" type="text" size="3" maxlength="3" required="Yes" message="Please Enter the Item Quantity (No Fractions)" validate="integer"></td>
	<td><font face="arial" size="2">Serial #:</font> <cfinput name="serialnumber1" type="text" size="12" maxlength="25" required="No" message="Please Enter the Serial Number"></td>    
    </tr>
    <tr>
	<td><font face="arial" size="2">Item#2:</font> 
	
	<cfselect query="Get_Item_No" name="itemnumber2" value="No" size="1" multiple="No">
	<OPTION value="" selected></OPTION>
	</cfselect>
	
	</td>
	<td><font face="arial" size="2">Quantity:</font> <cfinput name="quantity2" type="text" size="3" maxlength="3" required="No" message="Please Enter the Item Quantity (No Fractions)" validate="integer"></td>
    <td><font face="arial" size="2">Serial #:</font> <cfinput name="serialnumber2" type="text" size="12" maxlength="25" required="No"></td>
    </tr>
    <tr>
	<td><font face="arial" size="2">Item#3:</font> 
	
	<cfselect query="Get_Item_No" name="itemnumber3" value="No" size="1" multiple="No">
	<OPTION value="" selected></OPTION>
	</cfselect>
	
	</td>
	<td><font face="arial" size="2">Quantity:</font> <cfinput name="quantity3" type="text" size="3" maxlength="3" required="No" message="Please Enter the Item Quantity (No Fractions)" validate="integer"></td>
    <td><font face="arial" size="2">Serial #:</font> <cfinput name="serialnumber3" type="text" size="12" maxlength="25" required="No"></td>
    </tr>
    <tr>
	<td><font face="arial" size="2">Item#4:</font>
	
	<cfselect query="Get_Item_No" name="itemnumber4" value="No" size="1" multiple="No">
	<OPTION value="" selected></OPTION>
	</cfselect>
	
	</td>
	<td><font face="arial" size="2">Quantity:</font> <cfinput name="quantity4" type="text" size="3" maxlength="3" required="No" message="Please Enter the Item Quantity (No Fractions)" validate="integer"></td>
    <td><font face="arial" size="2">Serial #:</font> <cfinput name="serialnumber4" type="text" size="12" maxlength="25" required="No"></td>
    </tr>
    </table>
 		
	</td>
	</tr>
		
	<tr>
	<td colspan="2">
	<font face="arial" size="2"><b>Total Package Weight</b> (lbs.):</font> 
	<cfinput name="totalpackageweight" type="text" size="3" maxlength="3" required="Yes" message="Please Enter the Total Package Weight in Lbs. (Must be a whole number between 1-150, no fractions. Round up.)" validate="integer" range="1,150">
	</td>
	</tr>
	
		<tr>
          <td COLSPAN="2" align="left">
		  <b>
		  <font COLOR="#0C5782">#3) Reason for Return<br></font></b>
		  <hr width="100%" noshade color="#0C5782">
		  </td> 
        </tr>
		
		<tr>
          <td COLSPAN="2" align="left">
		  <textarea NAME="questions" ROWS="5" COLS="45"></textarea>
		  </td>
        </tr>
		
		<tr>
          <td colspan="2"> 
		  <br />
		  <font face="arial" size="2"><b>Please select type of return:</b></font> 
		  <cfselect name="typeofreturn" multiple="No" required="Yes" size="1" message="Please Choose one Return Type">
		 <OPTION value="Return for Credit - New Equipment">Return for Credit - New Equipment</OPTION>
		 <OPTION value="Repair and Return">Repair and Return</OPTION>		  
		 <OPTION value="Parts Return for Credit">Parts Return for Credit</OPTION>
		 <OPTION value="Supplies Return for Credit">Supplies Return for Credit</OPTION>	
   		 <OPTION value="Mispicked Supplies">Mispicked Supplies</OPTION>	
   		 <OPTION value="Mispicked Parts">Mispicked Parts</OPTION>	
   		 <OPTION value="ultimail maintenance program">ulti<strong>mail</strong>&trade; maintenance program</OPTION>	
	  
		  </cfselect>
		  <br />
		  <font face="arial" size="2"><b>Please Select One:</b></font> 
		  <cfselect name="typeofreturn2" multiple="No" required="Yes" size="1" message="Please Choose one Return Type">
            <OPTION value="Warranty Replacement">Warranty Replacement</OPTION>
            <OPTION value="Warranty Repair and Return">Warranty Repair and Return</OPTION>
            <OPTION value="20% Restocking Fee">20% Restocking Fee</OPTION>
            <OPTION value="Chargeable">Chargeable</OPTION>
            <OPTION value="Core Credit">Core Credit</OPTION>
            <OPTION value="Scale Refurb - Under Warranty">Scale Refurb - Under Warranty</OPTION>
            <OPTION value="Scale Refurb - Chargeable">Scale Refurb - Chargeable</OPTION>		
            <OPTION value="None of the above">None of the above</OPTION>  
   		 	<OPTION value="ultimail maintenance replacement">ulti<strong>mail</strong>&trade; maintenance replacement</OPTION>	
		  </cfselect>
		  </td>
		</tr>
		
		<tr>
          <td COLSPAN="2" align="left"> 
		  <b><font COLOR="#0C5782">#4) Return Procedures
		  <hr width="100%" noshade color="#0C5782">
          </font></b>
		  </td> 
        </tr>
				
		<tr>
          <td colspan="2"> 
		 <font face="arial" size="2">
		 
		 <!--
		 <div align="left">
		 <br />
		 <b><u>Return Procedures</u></b>
		 </div>
		 -->
		 
		 <br />	
		 <ol type="B">
		 <li><font face="arial" size="2">All items must be returned to FP in the original packaging</font></li>
		 <li><font face="arial" size="2">The packing slip you will receive via email must be included in the package.</font></li>
		 <li><font face="arial" size="2">Any parts, cords, cables, etc. sent with the machines MUST come back with the machines</font></li>
		 <li><font face="arial" size="2">All ink must be removed from the machine; Jetmail bases must have the serum loaded, M-Series must have the ink 
		 assembly removed, placed in a plastic bag and packed in a separate box.</font></li>
		 <li><font face="arial" size="2">All RA#'s are valid for 30 days</font></li>
		 <li><font face="arial" size="2">NO credit will be issued for items returned without an RA#. <br /> 
		 RA # MUST be clearly written on box.</font></li>
		 </ol>
		 <p />
		 <b>If above procedures are not followed, FP at its discretion can</b>:<br />
		 Deny any credit for the returned item and/or charge your account for the repairs required as a result of improper packaging
		 or damage from ink not being removed prior to return to FP.		
		 </font>
		 <p />
		  </td>
		</tr>
		
		<tr>
          <td COLSPAN="2" align="left">
		  <b>
		  <font COLOR="#0C5782">#5) Submit Request<br></font></b>
		  <hr width="100%" noshade color="#0C5782">
		  </td> 
        </tr>
		
		<tr>
          <td COLSPAN="2" ALIGN="CENTER">
		  <br />
	  <input TYPE="submit" VALUE="SUBMIT RA REQUEST" NAME="Submit">
	  &nbsp;&nbsp;&nbsp;&nbsp;
	  <input TYPE="reset" VALUE="RESET"></td>
        </tr>
      </table>
 
</cfform>
 
</cfif>
<!-- information ends here -->
</TD>
</TR>
</TABLE>
  <!--------END OF MAIN VIEWING WINDOW -------->
 
</td>
</tr>
 
</table>
 
</body>
</html>
[+][-]08.03.2008 at 10:24AM PDT, ID: 22148176

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

Zones: ColdFusion Application Server, ColdFusion Studio, JScript
Tags: ColdFusion, JavaScript, IE
Sign Up Now!
Solution Provided By: rob_lorentz
Participating Experts: 1
Solution Grade: A
 
 
[+][-]08.06.2008 at 07:24AM PDT, ID: 22170533

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.

 
[+][-]08.12.2008 at 08:03AM PDT, ID: 22213830

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.

 
[+][-]08.14.2008 at 11:06AM PDT, ID: 22232669

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

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

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628