Pure ASP Upload 3 Support Product Page

This topic was archived

Upload Error (40) File is required!

Asked 14 Oct 2007 18:29:56
1
has this question
14 Oct 2007 18:29:56 Gary Nutter posted:
I was trying to upload files and use the required upload option. When I tested the form leaving the files blank I get the popup msg that informed me the files were required. That part worked like a charm. When I selected OK on the popup msg, the page automatically goes to a blank page with the single error message "Upload Error (40) File is required!".

Thus is my question...how do I get it to hard stop at the popup msg and not proceed forward automatically to the blank page. I want my user to see the popup msg and clear it and then think"oh yeah, I forgot to add the files"...then add them and use the great tool as it is designed...

Any thoughts?

Thank you,

gnutter

Replies

Replied 15 Oct 2007 11:04:19
15 Oct 2007 11:04:19 Georgi Kralev replied:
Hi Gary,

If the alert message appears then the from should not processed.

Perhaps, there is placed some additional code on <b>onSubmit</b> of the form, which modify the value of <b>document.MM_returnValue</b> and is causing the issue.

Please, check and remove from <b>onSubmit</b> of the form any additional code which is NOT generated by Pure ASP Upload 3 extension.

Regards,

Georgi Kralev

----------------------------------
Support - www.DMXzone.com
Replied 16 Oct 2007 04:36:16
16 Oct 2007 04:36:16 Gary Nutter replied:
George,

There does not seem to be any additional code in the onsubmit associated with the form, just the pure aspupload code. Do you see any additional reason that the validate code would allowed to be clear and then the pure aspupload would continue to process to the error page.

Thank you for your assistance.

gan

Here is my page code:

&lt;%@LANGUAGE="VBSCRIPT"%&gt;
&lt;!--#include file="../Connections/connMainORI.asp" --&gt;
&lt;!--#include file="../ScriptLibrary/incPU3Class.asp" --&gt;
&lt;!--#include file="../ScriptLibrary/incPU3Utils.asp" --&gt;
&lt;%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers="sad"
MM_authFailedURL="www.richmondori.com/sad/sad_error.asp"
MM_grantAccess=false
If Session("MM_Username" &lt;&gt; "" Then
If (false Or CStr(Session("MM_UserAuthorization")="" Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization")&gt;=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?" &gt;= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL"
if (Len(Request.QueryString()) &gt; 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%&gt;
&lt;%
'*** Pure ASP File Upload 3.0.4
' Process form form3
Dim pau, DMX_uploadAction, UploadRequest, UploadQueryString, pau_thePath, pau_nameConflict, pau_saveWidth, pau_saveHeight
Set pau = new PureUpload
pau.ScriptLibrary = "../ScriptLibrary"
pau.ConflictHandling = "over"
pau.StoreType = "file"
pau.ProgressTemplate = "speedometer.htm"
pau.ProgressWidth = 400
pau.ProgressHeight = 200
pau.UploadFolder = ""
Dim uploadfileThumb
set uploadfileThumb = pau.AddField("fileThumb"
uploadfileThumb.UploadFolder = """../media/images/products/small"""
uploadfileThumb.Required = true
Dim uploadfileLarge
set uploadfileLarge = pau.AddField("fileLarge"
uploadfileLarge.UploadFolder = """../media/images/products"""
uploadfileLarge.Required = true
pau.ProcessUpload
pau.SaveAll
%&gt;

&lt;%
Dim MM_editAction
Dim UploadQueryString2
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")
If (UploadQueryString2 &lt;&gt; "" Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(UploadQueryString2)
End If

' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%&gt;
&lt;%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
If condition = "" Then
MM_IIf = ifFalse
Else
MM_IIf = ifTrue
End If
End Function
%&gt;
&lt;%
If (CStr(UploadFormRequest("MM_update") = "form2" Then
If (Not MM_abortEdit2) Then
' execute the update
Dim MM_editCmd2

Set MM_editCmd2 = Server.CreateObject ("ADODB.Command"
MM_editCmd2.ActiveConnection = MM_connMainORI_STRING
MM_editCmd2.CommandText = "UPDATE Products SET OrigPrice = ?, MemberPrice = ?, SuggestedPrice = ?, UnitPrice = ? WHERE ProductID = ?"
MM_editCmd2.Prepared = true
MM_editCmd2.Parameters.Append MM_editCmd2.CreateParameter("param1", 202, 1, 50, UploadFormRequest("hSupphotoID") ' adVarWChar
MM_editCmd2.Parameters.Append MM_editCmd2.CreateParameter("param1", 5, 1, -1, MM_IIF(UploadFormRequest("tORIcost", UploadFormRequest("tORIcost", null)) ' adDouble
MM_editCmd2.Parameters.Append MM_editCmd2.CreateParameter("param2", 5, 1, -1, MM_IIF(UploadFormRequest("txtJobber", UploadFormRequest("txtJobber", null)) ' adDouble
MM_editCmd2.Parameters.Append MM_editCmd2.CreateParameter("param3", 5, 1, -1, MM_IIF(UploadFormRequest("tSugRetail", UploadFormRequest("tSugRetail", null)) ' adDouble
MM_editCmd2.Parameters.Append MM_editCmd2.CreateParameter("param4", 5, 1, -1, MM_IIF(UploadFormRequest("tOnlinePrice", UploadFormRequest("tOnlinePrice", null)) ' adDouble
MM_editCmd2.Parameters.Append MM_editCmd2.CreateParameter("param5", 5, 1, -1, MM_IIF(UploadFormRequest("MM_recordId", UploadFormRequest("MM_recordId", null)) ' adDouble
MM_editCmd2.Execute
MM_editCmd2.ActiveConnection.Close

' append the query string to the redirect URL
Dim MM_editRedirectUrl2
MM_editRedirectUrl2 = "sad_prod3.asp"
If (UploadQueryString2 &lt;&gt; "" Then
If (InStr(1, MM_editRedirectUrl2, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl2 = MM_editRedirectUrl2 & "?" & UploadQueryString2
Else
MM_editRedirectUrl2 = MM_editRedirectUrl2 & "&" & UploadQueryString2
End If
End If
Response.Redirect(MM_editRedirectUrl2)
End If
End If
%&gt;
&lt;%
If (CStr(UploadFormRequest("MM_update") = "form1" Then
If (Not MM_abortEdit) Then
' execute the update
Dim MM_editCmd

Set MM_editCmd = Server.CreateObject ("ADODB.Command"
MM_editCmd.ActiveConnection = MM_connMainORI_STRING
MM_editCmd.CommandText = "UPDATE Products SET SKU = ?, ProductName = ?, SupplierName = ?, CategoryName = ?, UnitWeight = ?, [Description] = ? WHERE ProductID = ?"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 50, UploadFormRequest("tsku") ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 50, UploadFormRequest("tProdname") ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 50, UploadFormRequest("sSup") ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 50, UploadFormRequest("sCat") ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 5, 1, -1, MM_IIF(UploadFormRequest("tweight", UploadFormRequest("tweight", null)) ' adDouble
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 202, 1, 255, UploadFormRequest("tdesc") ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 5, 1, -1, MM_IIF(UploadFormRequest("MM_recordId", UploadFormRequest("MM_recordId", null)) ' adDouble
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "sad_prod2.asp"
If (UploadQueryString2 &lt;&gt; "" Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & UploadQueryString2
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & UploadQueryString2
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If
End If
%&gt;
&lt;%
If (CStr(UploadFormRequest("MM_update") = "form3" Then
If (Not MM_abortEdit) Then
' execute the update
Dim MM_editCmd3

Set MM_editCmd3 = Server.CreateObject ("ADODB.Command"
MM_editCmd3.ActiveConnection = MM_connMainORI_STRING
MM_editCmd3.CommandText = "UPDATE Products SET ProductPicture = ?, BigPicture = ? WHERE ProductID = ?"
MM_editCmd3.Prepared = true
MM_editCmd3.Parameters.Append MM_editCmd3.CreateParameter("param1", 202, 1, 50, MM_IIF(UploadFormRequest("fileThumb", UploadFormRequest("fileThumb", UploadFormRequest("upload_org_fileThumb")) ' adVarWChar
MM_editCmd3.Parameters.Append MM_editCmd3.CreateParameter("param2", 202, 1, 50, MM_IIF(UploadFormRequest("fileLarge", UploadFormRequest("fileLarge", UploadFormRequest("upload_org_fileLarge")) ' adVarWChar
MM_editCmd3.Parameters.Append MM_editCmd3.CreateParameter("param3", 5, 1, -1, MM_IIF(UploadFormRequest("MM_recordId", UploadFormRequest("MM_recordId", null)) ' adDouble
MM_editCmd3.Execute
MM_editCmd3.ActiveConnection.Close

' append the query string to the redirect URL
Dim MM_editRedirectUrl3
MM_editRedirectUrl3 = "sad_prod4.asp"
If (UploadQueryString2 &lt;&gt; "" Then
If (InStr(1, MM_editRedirectUrl3, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl3 = MM_editRedirectUrl3 & "?" & UploadQueryString2
Else
MM_editRedirectUrl3 = MM_editRedirectUrl3 & "&" & UploadQueryString2
End If
End If
Response.Redirect(MM_editRedirectUrl3)
End If
End If
%&gt;
&lt;%
Dim rsSupplier
Dim rsSupplier_cmd
Dim rsSupplier_numRows

Set rsSupplier_cmd = Server.CreateObject ("ADODB.Command"
rsSupplier_cmd.ActiveConnection = MM_connMainORI_STRING
rsSupplier_cmd.CommandText = "SELECT * FROM qSuppliers_all"
rsSupplier_cmd.Prepared = true

Set rsSupplier = rsSupplier_cmd.Execute
rsSupplier_numRows = 0
%&gt;
&lt;%
Dim rsCategory
Dim rsCategory_cmd
Dim rsCategory_numRows

Set rsCategory_cmd = Server.CreateObject ("ADODB.Command"
rsCategory_cmd.ActiveConnection = MM_connMainORI_STRING
rsCategory_cmd.CommandText = "SELECT * FROM qCategory_active"
rsCategory_cmd.Prepared = true

Set rsCategory = rsCategory_cmd.Execute
rsCategory_numRows = 0
%&gt;
&lt;%
Dim rsProducts__MMColParam
rsProducts__MMColParam = "1"
If (Session("sessProdID" &lt;&gt; "" Then
rsProducts__MMColParam = Session("sessProdID"
End If
%&gt;
&lt;%
Dim rsProducts
Dim rsProducts_cmd
Dim rsProducts_numRows

Set rsProducts_cmd = Server.CreateObject ("ADODB.Command"
rsProducts_cmd.ActiveConnection = MM_connMainORI_STRING
rsProducts_cmd.CommandText = "SELECT * FROM qProducts_all WHERE ProductID = ?"
rsProducts_cmd.Prepared = true
rsProducts_cmd.Parameters.Append rsProducts_cmd.CreateParameter("param1", 5, 1, -1, rsProducts__MMColParam) ' adDouble

Set rsProducts = rsProducts_cmd.Execute
rsProducts_numRows = 0
%&gt;
&lt;%
Dim rsProdSupp__MMColParam
rsProdSupp__MMColParam = "1"
If (Session("sessProdID" &lt;&gt; "" Then
rsProdSupp__MMColParam = Session("sessProdID"
End If
%&gt;
&lt;%
Dim rsProdSupp
Dim rsProdSupp_cmd
Dim rsProdSupp_numRows

Set rsProdSupp_cmd = Server.CreateObject ("ADODB.Command"
rsProdSupp_cmd.ActiveConnection = MM_connMainORI_STRING
rsProdSupp_cmd.CommandText = "SELECT * FROM qprod_supp WHERE ProductID = ?"
rsProdSupp_cmd.Prepared = true
rsProdSupp_cmd.Parameters.Append rsProdSupp_cmd.CreateParameter("param1", 5, 1, -1, rsProdSupp__MMColParam) ' adDouble

Set rsProdSupp = rsProdSupp_cmd.Execute
rsProdSupp_numRows = 0
%&gt;&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;ORI Administrative Menu&lt;/title&gt;
&lt;META name="Copyright" content="Copyright Off Road Innovations www.richmondori.com" /&gt;
&lt;META http-equiv="refresh" content="www.richmondori.com/sad/sad_prod3.asp" /&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
&lt;META name="Rating" content="General" /&gt;




&lt;link rel="StyleSheet" href="scriptlibrary/corporatestyle.css" type="text/css" /&gt;
&lt;link rel="StyleSheet" href="scriptlibrary/menu.css" type="text/css" /&gt;


&lt;script language="JavaScript" type="text/javascript" src="scriptlibrary/javascripts.js"&gt;&lt;/script&gt;
&lt;script language="JavaScript" type="text/javascript" src="scriptlibrary/pop-closeup.js"&gt;&lt;/script&gt;
&lt;script language="JavaScript" type="text/javascript" src="scriptlibrary/mouseover.js"&gt;&lt;/script&gt;
&lt;script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;link href="../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css"&gt;
&lt;style type="text/css"&gt;
&lt;!--
.style2 {
color: #FF0000;
font-weight: bold;
font-size: 9px;
}
.style3 {font-size: 9px}
.style4 {font-size: 9px; color: #FF0000; }
.style5 {
color: #666666;
font-weight: bold;
}
--&gt;
&lt;/style&gt;
&lt;script type="text/javascript"&gt;
&lt;!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?")&gt;0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i&lt;d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i&lt;d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function YY_checkform() { //v4.66
//copyright (c)1998,2002 Yaromat.com
var args = YY_checkform.arguments; var myDot=true; var myV=''; var myErr='';var addErr=false;var myReq;
for (var i=1; i&lt;args.length;i=i+4){
if (args[i+1].charAt(0)=='#'){myReq=true; args[i+1]=args[i+1].substring(1);}else{myReq=false}
var myObj = MM_findObj(args[i].replace(/\[\d+\]/ig,"");
myV=myObj.value;
if (myObj.type=='text'||myObj.type=='password'||myObj.type=='hidden'){
if (myReq&&myObj.value.length==0){addErr=true}
if ((myV.length&gt;0)&&(args[i+2]==1)){ //fromto
var myMa=args[i+1].split('_');if(isNaN(myV)||myV&lt;myMa[0]/1||myV &gt; myMa[1]/1){addErr=true}
} else if ((myV.length&gt;0)&&(args[i+2]==2)){
var rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-z]{2,4}$";if(!rx.test(myV))addErr=true;
} else if ((myV.length&gt;0)&&(args[i+2]==3)){ // date
var myMa=args[i+1].split("#"; var myAt=myV.match(myMa[0]);
if(myAt){
var myD=(myAt[myMa[1]])?myAt[myMa[1]]:1; var myM=myAt[myMa[2]]-1; var myY=myAt[myMa[3]];
var myDate=new Date(myY,myM,myD);
if(myDate.getFullYear()!=myY||myDate.getDate()!=myD||myDate.getMonth()!=myM){addErr=true};
}else{addErr=true}
} else if ((myV.length&gt;0)&&(args[i+2]==4)){ // time
var myMa=args[i+1].split("#"; var myAt=myV.match(myMa[0]);if(!myAt){addErr=true}
} else if (myV.length&gt;0&&args[i+2]==5){ // check this 2
var myObj1 = MM_findObj(args[i+1].replace(/\[\d+\]/ig,"");
if(myObj1.length)myObj1=myObj1[args[i+1].replace(/(.*\[)|(\].*)/ig,""];
if(!myObj1.checked){addErr=true}
} else if (myV.length&gt;0&&args[i+2]==6){ // the same
var myObj1 = MM_findObj(args[i+1]);
if(myV!=myObj1.value){addErr=true}
}
} else
if (!myObj.type&&myObj.length&gt;0&&myObj[0].type=='radio'){
var myTest = args[i].match(/(.*)\[(\d+)\].*/i);
var myObj1=(myObj.length&gt;1)?myObj[myTest[2]]:myObj;
if (args[i+2]==1&&myObj1&&myObj1.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
if (args[i+2]==2){
var myDot=false;
for(var j=0;j&lt;myObj.length;j++){myDot=myDot||myObj[j].checked}
if(!myDot){myErr+='* ' +args[i+3]+'\n'}
}
} else if (myObj.type=='checkbox'){
if(args[i+2]==1&&myObj.checked==false){addErr=true}
if(args[i+2]==2&&myObj.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
} else if (myObj.type=='select-one'||myObj.type=='select-multiple'){
if(args[i+2]==1&&myObj.selectedIndex/1==0){addErr=true}
}else if (myObj.type=='textarea'){
if(myV.length&lt;args[i+1]){addErr=true}
}
if (addErr){myErr+='* '+args[i+3]+'\n'; addErr=false}
}
if (myErr!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+myErr)}
document.MM_returnValue = (myErr=='');
}
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"&gt;&lt;%=pau.generateScriptCode()%&gt;&lt;/script&gt;
&lt;script src="../ScriptLibrary/incPU3.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;BODY BGCOLOR="#FFFFFF" TEXT="#000000" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" marginheight="0" marginwidth="0"&gt;
&lt;table cellpadding="0" cellspacing="0" border="0" width="100%"&gt;
&lt;tr&gt;
&lt;td align="left" valign="top" class="tablebackground"&gt;&lt;a name="top"&gt;&lt;/a&gt;
&lt;script language="JavaScript" type="text/javascript" src="scriptlibrary/header.js"&gt;&lt;/script&gt;
&lt;table cellpadding="0" cellspacing="0" border="0" width="100%" class="printhide"&gt;
&lt;tr&gt;
&lt;td background="media/img/split-bar.jpg"&gt;&lt;img src="media/img/spacer.gif" height="28" width="15" border="0" alt="image" /&gt;&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;table cellpadding="0" cellspacing="0" border="0" width="100%" class="imagebackground"&gt;
&lt;tr&gt;
&lt;td align="left" width="750"&gt;&lt;script language="JavaScript" type="text/javascript" src="scriptlibrary/imagechanger.js"&gt;&lt;/script&gt;
&lt;/td&gt;
&lt;td align="left"&gt;&lt;img src="media/img/top-picture-end.gif" border="0" width="28" height="80" alt="image" /&gt;&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;table cellpadding="0" cellspacing="0" border="0" width="100%" class="printhide"&gt;
&lt;tr&gt;
&lt;td background="media/img/split-bar.jpg"&gt;&lt;img src="media/img/spacer.gif" height="28" width="15" border="0" alt="image" /&gt;&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;TABLE cellpadding="0" cellspacing="0" border="0" width="100%"&gt;
&lt;tr&gt;
&lt;td align="center" valign="top" width="186" class="menu-background"&gt;&lt;script language="JavaScript" type="text/javascript" src="scriptlibrary/menu.js"&gt;&lt;/script&gt;
&lt;script language="JavaScript" type="text/javascript" src="scriptlibrary/pageheight.js"&gt;&lt;/script&gt;
&lt;/td&gt;
&lt;td align="center" valign="top"&gt;&lt;TABLE cellpadding="0" cellspacing="10" border="0" width="550"&gt;
&lt;tr&gt;
&lt;td align="left" valign="top"&gt;&lt;br /&gt;
&lt;span class="title"&gt; Product Menu...&lt;/span&gt;&lt;span class="careertitle"&gt;add product &lt;/span&gt;&lt;span class="title"&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;table width="435" border="0"&gt;
&lt;tr&gt;
&lt;td width="429"&gt;&lt;div id="TabbedPanels1" class="TabbedPanels"&gt;
&lt;ul class="TabbedPanelsTabGroup"&gt;
&lt;li class="TabbedPanelsTab" tabindex="0"&gt;Product Information&lt;/li&gt;
&lt;li class="TabbedPanelsTab" tabindex="0"&gt;Pricing Information&lt;/li&gt;
&lt;li class="TabbedPanelsTab" tabindex="0"&gt;Product Photos&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="TabbedPanelsContentGroup"&gt;
&lt;div class="TabbedPanelsContent"&gt;&lt;span class="style5"&gt;Step 1&lt;/span&gt;&lt;br/&gt;
&lt;br/&gt;
Enter the New Product Information Below:&lt;br /&gt;
&lt;br /&gt;
&lt;span class="style2"&gt;NOTE&lt;/span&gt;&lt;span class="style3"&gt;: If the &lt;strong&gt;Supplier&lt;/strong&gt; of &lt;strong&gt;Category&lt;/strong&gt; is not present, it will need to be added first.&lt;/span&gt;
&lt;form ACTION="&lt;%=MM_editAction%&gt;" METHOD="POST" name="form1" onSubmit="YY_checkform('form1','tsku','#q','0','SKU Number is a required field','tProdname','#q','0','Product Name is a required field','tweight','#q','0','Weight is a required field','sSup','#q','1','Supplier is a required field','sCat','#q','1','Category is a required field','tdesc','3','1','Description is a required field');return document.MM_returnValue"&gt;
&lt;table width="358" border="0"&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;&lt;div align="center" class="style4"&gt;all fields are required&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="172"&gt;ORI
Number:&lt;/td&gt;
&lt;td width="268"&gt;&lt;%=(rsProducts.Fields.Item("T4WID".Value)%&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SKU Number&lt;/td&gt;
&lt;td&gt;&lt;input name="tsku" type="text" id="tsku" value="&lt;%=(rsProducts.Fields.Item("SKU".Value)%&gt;"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Product Name&lt;/td&gt;
&lt;td&gt;&lt;input name="tProdname" type="text" id="tProdname" value="&lt;%=(rsProducts.Fields.Item("ProductName".Value)%&gt;" size="30"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Supplier&lt;/td&gt;
&lt;td&gt;&lt;select name="sSup" id="sSup"&gt;
&lt;option selected value="" &lt;%If (Not isNull((rsProducts.Fields.Item("SupplierName".Value))) Then If ("" = CStr((rsProducts.Fields.Item("SupplierName".Value))) Then Response.Write("selected=""selected""" : Response.Write(""%&gt;&gt;Select&lt;/option&gt;
&lt;%
While (NOT rsSupplier.EOF)
%&gt;
&lt;option value="&lt;%=(rsSupplier.Fields.Item("CompanyName".Value)%&gt;" &lt;%If (Not isNull((rsProducts.Fields.Item("SupplierName".Value))) Then If (CStr(rsSupplier.Fields.Item("CompanyName".Value) = CStr((rsProducts.Fields.Item("SupplierName".Value))) Then Response.Write("selected=""selected""" : Response.Write(""%&gt; &gt;&lt;%=(rsSupplier.Fields.Item("CompanyName".Value)%&gt;&lt;/option&gt;
&lt;%
rsSupplier.MoveNext()
Wend
If (rsSupplier.CursorType &gt; 0) Then
rsSupplier.MoveFirst
Else
rsSupplier.Requery
End If
%&gt;
&lt;/select&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Category&lt;/td&gt;
&lt;td&gt;&lt;select name="sCat" id="sCat"&gt;
&lt;option selected value="" &lt;%If (Not isNull((rsProducts.Fields.Item("CategoryName".Value))) Then If ("" = CStr((rsProducts.Fields.Item("CategoryName".Value))) Then Response.Write("selected=""selected""" : Response.Write(""%&gt;&gt;Select&lt;/option&gt;
&lt;%
While (NOT rsCategory.EOF)
%&gt;
&lt;option value="&lt;%=(rsCategory.Fields.Item("CategoryName".Value)%&gt;" &lt;%If (Not isNull((rsProducts.Fields.Item("CategoryName".Value))) Then If (CStr(rsCategory.Fields.Item("CategoryName".Value) = CStr((rsProducts.Fields.Item("CategoryName".Value))) Then Response.Write("selected=""selected""" : Response.Write(""%&gt; &gt;&lt;%=(rsCategory.Fields.Item("CategoryName".Value)%&gt;&lt;/option&gt;
&lt;%
rsCategory.MoveNext()
Wend
If (rsCategory.CursorType &gt; 0) Then
rsCategory.MoveFirst
Else
rsCategory.Requery
End If
%&gt;
&lt;/select&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Weight (whole #)&lt;/td&gt;
&lt;td&gt;&lt;input name="tweight" type="text" id="tweight" value="&lt;%=(rsProducts.Fields.Item("UnitWeight".Value)%&gt;" size="15"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Description&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td colspan="2"&gt;&lt;font size="2" face="Verdana"&gt;
&lt;textarea name="tdesc" cols="50" rows="4" id="tdesc"&gt;&lt;%=(rsProducts.Fields.Item("Description".Value)%&gt;&lt;/textarea&gt;
&lt;/font&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;&lt;div align="center"&gt;
&lt;label for="button"&gt;&lt;/label&gt;
&lt;input type="submit" name="button" id="button" value="Submit"&gt;
&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;



&lt;input type="hidden" name="MM_update" value="form1"&gt;
&lt;input type="hidden" name="MM_recordId" value="&lt;%= rsProducts.Fields.Item("ProductID".Value %&gt;"&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;div class="TabbedPanelsContent"&gt;&lt;span class="style5"&gt;Step 2&lt;/span&gt;&lt;br/&gt;
&lt;br/&gt;
Enter the New Product Pricing Information Below:&lt;br /&gt;
&lt;br /&gt;
&lt;span class="style2"&gt;NOTE&lt;/span&gt;&lt;span class="style3"&gt;: Enter only dollars and cents, do not enter the $ sign.&lt;/span&gt;&lt;br/&gt;
&lt;br/&gt;&lt;form ACTION="&lt;%=MM_editAction%&gt;" METHOD="POST" name="form2" id="form2" onSubmit="YY_checkform('form2','tORIcost','#q','0','ORI Cost is a required field','txtJobber','#q','0','Jobber Price is a required field','tSugRetail','#q','0','Suggested Retail is a required field','tOnlinePrice','#q','0','Online Price is a required field');return document.MM_returnValue"&gt;
&lt;table width="358" border="0"&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;&lt;div align="center"&gt;&lt;span class="style4"&gt;
&lt;input name="hSupphotoID" type="hidden" id="hSupphotoID" value="&lt;%=(rsProdSupp.Fields.Item("sLogoPic".Value)%&gt;"&gt;
&lt;input name="hProdID" type="hidden" id="hProdID" value="&lt;%=(rsProducts.Fields.Item("ProductID".Value)%&gt;"&gt;
all fields are required&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="147"&gt;ORI Cost&lt;/td&gt;
&lt;td width="201"&gt;&lt;input name="tORIcost" type="text" id="tORIcost" value="&lt;%=(FormatNumber((rsProducts.Fields.Item("OrigPrice".Value), 2, -2, -2, -2))%&gt;"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Jobber Price&lt;/td&gt;
&lt;td&gt;&lt;input name="txtJobber" type="text" id="txtJobber" value="&lt;%=(FormatNumber((rsProducts.Fields.Item("MemberPrice".Value), 2, -2, -2, -2))%&gt;"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Suggested Retail Price&lt;/td&gt;
&lt;td&gt;&lt;input name="tSugRetail" type="text" id="tSugRetail" value="&lt;%=(FormatNumber((rsProducts.Fields.Item("SuggestedPrice".Value), 2, -2, -2, -2))%&gt;" size="30"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ORI Online Price&lt;/td&gt;
&lt;td&gt;&lt;input name="tOnlinePrice" type="text" id="tOnlinePrice" value="&lt;%=(FormatNumber((rsProducts.Fields.Item("UnitPrice".Value), 2, -2, -2, -2))%&gt;" size="15"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;&lt;div align="center"&gt;
&lt;label for="button"&gt;&lt;/label&gt;
&lt;input type="submit" name="button" id="button" value="Submit"&gt;
&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;



&lt;input type="hidden" name="MM_update" value="form2"&gt;
&lt;input type="hidden" name="MM_recordId" value="&lt;%= rsProducts.Fields.Item("ProductID".Value %&gt;"&gt;
&lt;/form&gt;&lt;/div&gt;
&lt;div class="TabbedPanelsContent"&gt;&lt;span class="style5"&gt;Step 3&lt;/span&gt;&lt;br/&gt;
&lt;br/&gt;Enter Product Photograph Files:&lt;br/&gt;
&lt;br/&gt;&lt;form action="&lt;%=MM_editAction%&gt;" method="post" enctype="multipart/form-data" name="form3" id="form3" onSubmit="&lt;%=pau.submitCode()%&gt;"&gt;
&lt;table width="358" border="0"&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="120"&gt;Thumbnail Photo:&lt;/td&gt;
&lt;td width="228"&gt;&lt;input name="fileThumb" type="file" id="fileThumb" onChange="&lt;%=uploadfileThumb.validateCode()%&gt;;return document.MM_returnValue" value=""&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large Photo:&lt;/td&gt;
&lt;td&gt;&lt;label for="fileLarge"&gt;&lt;/label&gt;
&lt;input name="fileLarge" type="file" id="fileLarge" onChange="&lt;%=uploadfileLarge.validateCode()%&gt;;return document.MM_returnValue" value=""&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;td&gt;&nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;&lt;div align="center"&gt;
&lt;label for="button"&gt;&lt;/label&gt;
&lt;input type="submit" name="button" id="button" value="Submit"&gt;
&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;input type="hidden" name="MM_update" value="form3"&gt;
&lt;input type="hidden" name="MM_recordId" value="&lt;%= rsProducts.Fields.Item("ProductID".Value %&gt;"&gt;
&lt;input type="hidden" name="upload_org_fileThumb" value="" /&gt;
&lt;input type="hidden" name="upload_org_fileLarge" value="" /&gt;
&lt;/form&gt;&lt;form action="sad_prod4.asp" method="post" enctype="multipart/form-data" name="form3a" id="form3a"&gt;
&lt;div align="center"&gt;If not photos are to be added at this time, select the
button below.&lt;br/&gt;
&lt;br/&gt;&lt;input name="bSkip" type="submit" id="bSkip" value="Skip Photo Upload"&gt;
&lt;/div&gt;
&lt;/form&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;&lt;/td&gt;
&lt;td width="30"&gt;&lt;img src="www.richmondori.com/sad/media/img/spacer.gif" HEIGHT="10" width="30" border="0" alt="image" /&gt;&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="menu-background"&gt;&lt;table cellpadding="0" cellspacing="0" border="0" width="185" class="printhide"&gt;
&lt;tr&gt;
&lt;td align="center"&gt;&lt;a href="#top"&gt;&lt;img src="www.richmondori.com/sad/media/img/arrow-topoff.gif" border="0" alt="Top of Page" hspace="0" vspace="12" onMouseOver="this.src='www.richmondori.com/sad/media/img/arrow-topon.gif'" onMouseOut="this.src='www.richmondori.com/sad/media/img/arrow-topoff.gif'" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;&lt;/td&gt;
&lt;td colspan="2"&gt;&nbsp;&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;table cellpadding="0" cellspacing="0" border="0" width="100%" class="printhide"&gt;
&lt;tr&gt;
&lt;td background="media/img/split-bar.jpg"&gt;&lt;img src="media/img/spacer.gif" height="28" width="15" border="0" alt="image" /&gt;&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;TABLE cellpadding="0" cellspacing="6" border="0" width="100%" background="media/img/bottom-shade.gif"&gt;
&lt;tr&gt;
&lt;td align="left" valign="middle"&gt;&lt;script language="JavaScript" type="text/javascript" src="scriptlibrary/copyright.js"&gt;&lt;/script&gt;&lt;/td&gt;
&lt;td align="right" valign="middle"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;script type="text/javascript"&gt;
&lt;!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1", {defaultTab:2});
//--&gt;
&lt;/script&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;
&lt;%
rsSupplier.Close()
Set rsSupplier = Nothing
%&gt;
&lt;%
rsCategory.Close()
Set rsCategory = Nothing
%&gt;
&lt;%
rsProducts.Close()
Set rsProducts = Nothing
%&gt;
&lt;%
rsProdSupp.Close()
Set rsProdSupp = Nothing
%&gt;
Replied 16 Oct 2007 09:50:08
16 Oct 2007 09:50:08 Georgi Kralev replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
There does not seem to be any additional code in the onsubmit associated with the form, just the pure aspupload code. Do you see any additional reason that the validate code would allowed to be clear and then the pure aspupload would continue to process to the error page.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Actually, there is additional code. It is the code of yaromat check.
This code, has been replaced those of Pure ASP Upload 3 and this is causing the issue.

<i>&lt;form ACTION="&lt;%=MM_editAction%&gt;" METHOD="POST" name="form1" onSubmit=<b>"YY_checkform('form1','tsku','#q','0','SKU Number is a required field','tProdname','#q','0','Product Name is a required field','tweight','#q','0','Weight is a required field','sSup','#q','1','Supplier is a required field','sCat','#q','1','Category is a required field','tdesc','3','1','Description is a required field');</b>return document.MM_returnValue"&gt;</i>

To use yaromat check with Pure ASP Upload 3 please, check the following FAQ:
www.dmxzone.com/showDetail.asp?TypeId=7&NewsId=1806

Regards,

Georgi Kralev

----------------------------------
Support - www.DMXzone.com
Replied 17 Oct 2007 00:58:17
17 Oct 2007 00:58:17 Gary Nutter replied:
George,

Thank you for the response, but let me call your attention more closely to the form I am referring to. I submitted the whole page and it was a lot, sorry. I am using the Spry Tabbed Panels and the page I dumped for your review has all the panels there. The actual panel that is in reference to my problem is listed below. It is the one I mentioned I see not additional code.

From looking at this, do you see any other ideas?

Thank you,

gan

********** Panel Code*************

&lt;div class="TabbedPanelsContent"&gt;&lt;span class="style5"&gt;Step 3&lt;/span&gt;&lt;br/&gt;
&lt;br/&gt;Enter Product Photograph Files:&lt;br/&gt;
&lt;br/&gt;&lt;form action="&lt;%=MM_editAction%&gt;" method="post" enctype="multipart/form-data" name="form3" id="form3" onSubmit="&lt;%=pau.submitCode()%&gt;"&gt;
&lt;table width="358" border="0"&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="120"&gt;Thumbnail Photo:&lt;/td&gt;
&lt;td width="228"&gt;&lt;input name="fileThumb" type="file" id="fileThumb" onChange="&lt;%=uploadfileThumb.validateCode()%&gt;;return document.MM_returnValue" value=""&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large Photo:&lt;/td&gt;
&lt;td&gt;&lt;label for="fileLarge"&gt;&lt;/label&gt;
&lt;input name="fileLarge" type="file" id="fileLarge" onChange="&lt;%=uploadfileLarge.validateCode()%&gt;;return document.MM_returnValue" value=""&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;&lt;div align="center"&gt;
&lt;label for="button"&gt;&lt;/label&gt;
&lt;input type="submit" name="button" id="button" value="Submit"&gt;
&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;input type="hidden" name="MM_update" value="form3"&gt;
&lt;input type="hidden" name="MM_recordId" value="&lt;%= rsProducts.Fields.Item("ProductID".Value %&gt;"&gt;
&lt;input type="hidden" name="upload_org_fileThumb" value="" /&gt;
&lt;input type="hidden" name="upload_org_fileLarge" value="" /&gt;
&lt;/form&gt;
Replied 17 Oct 2007 02:08:19
17 Oct 2007 02:08:19 Gary Nutter replied:
George,

I found a fix for my problem. I got to thinking about the spry tabs and how DW processes the &lt;%MM_EditAction%&gt;. My code was riddled with inaccuracies since DW doesn't like to play that way unless you modify a few things sometimes. I broke out the Pic upload to a separate page, removed and readded the form and Pure ASP upload and then added the final product review tab for setting the status as Active or inactive.

I had to modify the MM_editCmd to MM_editCmd4 (actually and variable would have worked) and changed that throughout the final update code.

BOOM...worked like a champ! I bent it, stepped on it and stress tested it...and the validation code worked the upload and reupload on the previous tab worked fine.

Sorry for the firedrill...but you really helped me by your comments...sometimes you can look at a problem and it stares you in the face until you look at it from a different perspective.

I appreciate your help!

gan
Replied 17 Oct 2007 09:23:54
17 Oct 2007 09:23:54 Georgi Kralev replied:
Hi Gary,

Thank you for your update upon the issue.
I am glad that everything worked fine at the end.

If we can assist you will some other problem or question about our extensions, do not hesitate to contact us.

Best regards,

Georgi Kralev

----------------------------------
Support - www.DMXzone.com

Reply to this topic