Bill Henderson
asked on
ASPVB newb struggling with DMXZone image upload/resize
Hi,
I have an aspVB page built in Dreamweaver using DMXZone's ASP Upload 3 and Smart Image Processor 2 on multiple image file fields - the form is an update record form that correctly captures and updates every value except the file fields.
If a user uploads a new picture every time, the system works perfectly. However, if a user decides not to upload a new picture (say they just want to change the name or price) the existing image record in the database gets overwritten with a blank value.
DXMZone's own content indicates that to solve this, all you need to do is bind the image field record to the image upload field in the form and then if no new image is selected, it will capture the old image db value and proceed.
But this doesn't work.
Can anyone guess as to why this form is behaving as described? Sorry the code is so long, but it's a complex form. I believe the critical code in question is on the image field itself and a hidden file field as well:
<label>
<input name="image1" type="file" id="image1" onChange="<%=pau.validateC ode()%>;re turn document.MM_returnValue" value="<%=(Recordset4.Fiel ds.Item("I mage1").Va lue)%>" />
</label>
and here is the hidden field:
<input type="hidden" name="upload_org_image1" value="<%=(Recordset4.Fiel ds.Item("I mage1").Va lue)%>" />
But the full code may shed some light on what is happening if you are an ASP or VB expert (or DMX Zone expert).
Here is the full code:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/shepherd s.asp" -->
<!--#include file="ScriptLibrary/incPU3 Class.asp" -->
<!--#include file="ScriptLibrary/incPU3 Utils.asp" -->
<%
'*** Pure ASP File Upload 3.0.9
' Process form shepherd
Dim pau, DMX_uploadAction, UploadRequest, UploadQueryString, pau_thePath, pau_nameConflict, pau_saveWidth, pau_saveHeight
Set pau = new PureUpload
pau.ScriptLibrary = "ScriptLibrary"
pau.MaxSize = 20000
pau.ConflictHandling = "over"
pau.StoreType = "file"
pau.ProgressTemplate = "vista_look.htm"
pau.ProgressWidth = 300
pau.ProgressHeight = 100
pau.UploadFolder = """Uploads"""
pau.AllowedExtensions = "GIF,JPG,JPEG,BMP,PNG" ' "images"
pau.MaxFileSize = 10000
pau.ProcessUpload
pau.SaveAll
%>
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariabl es("SCRIPT _NAME"))
If (UploadQueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(UploadQu eryString)
End If
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
If condition = "" Then
MM_IIf = ifFalse
Else
MM_IIf = ifTrue
End If
End Function
%>
<%
If (CStr(UploadFormRequest("M M_update") ) = "shepherd") Then
If (Not MM_abortEdit) Then
' execute the update
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnectio n = MM_shepherds_STRING
MM_editCmd.CommandText = "UPDATE Product SET DescriptionType = ?, ProdCatID = ?, ProdName = ?, MainParagraph = ?, [1line_desc] = ?, desc3 = ?, desc2 = ?, firstbulletlistline1 = ?, firstbulletlist = ?, firstbulletlistline3 = ?, firstbulletlistline2 = ?, firstbulletlistline5 = ?, firstbulletlistline4 = ?, secondbulletlistline1 = ?, secondbulletlist = ?, secondbulletlistline3 = ?, secondbulletlistline2 = ?, secondbulletlistline5 = ?, secondbulletlistline4 = ?, SizesYesNo = ?, PricedFrom = ?, SpecialShippingAmount = ?, SpecialShippingYesNo = ?, FeaturedYesNo = ?, CarePage12 = ?, OptionalPageLink = ?, PackagingCharge = ?, OptionalPageLinkText = ?, OnSaleYesNo = ?, RecommendedAdd2 = ?, RecommendedAdd1 = ?, ShipsBy = ?, Image1 = ?, Image4 = ?, Image2 = ?, Image5 = ?, Image3 = ? WHERE ID = ?"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param1", 202, 1, 50, UploadFormRequest("Descrip tionType") ) ' adVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param2", 202, 1, 50, UploadFormRequest("ProdCat ID")) ' adVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param3", 203, 1, 1073741823, UploadFormRequest("ProdNam e")) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param4", 203, 1, 1073741823, UploadFormRequest("MainPar agraph")) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param5", 203, 1, 1073741823, UploadFormRequest("1line_d esc")) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param6", 203, 1, 1073741823, UploadFormRequest("desc3") ) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param7", 203, 1, 1073741823, UploadFormRequest("desc2") ) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param8", 203, 1, 1073741823, UploadFormRequest("firstbu lletlistli ne1")) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param9", 203, 1, 1073741823, UploadFormRequest("firstbu lletlist") ) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param10" , 203, 1, 1073741823, UploadFormRequest("firstbu lletlistli ne3")) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param11" , 203, 1, 1073741823, UploadFormRequest("firstbu lletlistli ne2")) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param12" , 203, 1, 1073741823, UploadFormRequest("firstbu lletlistli ne5")) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param13" , 203, 1, 1073741823, UploadFormRequest("firstbu lletlistli ne4")) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param14" , 203, 1, 1073741823, UploadFormRequest("secondb ulletlistl ine1")) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param15" , 203, 1, 1073741823, UploadFormRequest("secondb ulletlist" )) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param16" , 203, 1, 1073741823, UploadFormRequest("secondb ulletlistl ine3")) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param17" , 203, 1, 1073741823, UploadFormRequest("secondb ulletlistl ine2")) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param18" , 203, 1, 1073741823, UploadFormRequest("secondb ulletlistl ine5")) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param19" , 203, 1, 1073741823, UploadFormRequest("secondb ulletlistl ine4")) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param20" , 202, 1, 255, UploadFormRequest("SizesYe sNo")) ' adVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param21" , 202, 1, 255, UploadFormRequest("PricedF rom")) ' adVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param22" , 202, 1, 255, UploadFormRequest("Special ShippingAm ount")) ' adVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param23" , 202, 1, 255, UploadFormRequest("Special ShippingYe sNo")) ' adVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param24" , 202, 1, 50, UploadFormRequest("Feature dYesNo")) ' adVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param25" , 202, 1, 255, UploadFormRequest("CarePag e12")) ' adVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param26" , 203, 1, 1073741823, UploadFormRequest("Optiona lPageLink" )) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param27" , 202, 1, 255, UploadFormRequest("Packagi ngCharge") ) ' adVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param28" , 203, 1, 1073741823, UploadFormRequest("Optiona lPageLinkT ext")) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param29" , 202, 1, 255, UploadFormRequest("OnSaleY esNo")) ' adVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param30" , 202, 1, 50, UploadFormRequest("Recomme ndedAdd2") ) ' adVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param31" , 202, 1, 50, UploadFormRequest("Recomme ndedAdd1") ) ' adVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param32" , 203, 1, 1073741823, UploadFormRequest("ShipsBy ")) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param33" , 203, 1, 1073741823, MM_IIF(UploadFormRequest(" image1"), UploadFormRequest("image1" ), UploadFormRequest("upload_ org_image1 "))) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param34" , 203, 1, 1073741823, MM_IIF(UploadFormRequest(" image4"), UploadFormRequest("image4" ), UploadFormRequest("upload_ org_image4 "))) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param35" , 203, 1, 1073741823, MM_IIF(UploadFormRequest(" image2"), UploadFormRequest("image2" ), UploadFormRequest("upload_ org_image2 "))) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param36" , 203, 1, 1073741823, MM_IIF(UploadFormRequest(" image5"), UploadFormRequest("image5" ), UploadFormRequest("upload_ org_image5 "))) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param37" , 203, 1, 1073741823, MM_IIF(UploadFormRequest(" image3"), UploadFormRequest("image3" ), UploadFormRequest("upload_ org_image3 "))) ' adLongVarWChar
MM_editCmd.Parameters.Appe nd MM_editCmd.CreateParameter ("param38" , 5, 1, -1, MM_IIF(UploadFormRequest(" MM_recordI d"), UploadFormRequest("MM_reco rdId"), null)) ' adDouble
MM_editCmd.Execute
MM_editCmd.ActiveConnectio n.Close
' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "add_sizes.asp"
If (UploadQueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & UploadQueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & UploadQueryString
End If
End If
Response.Redirect(MM_editR edirectUrl )
End If
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConne ction = MM_shepherds_STRING
Recordset1_cmd.CommandText = "SELECT * FROM ProdCategory ORDER BY CatName ASC"
Recordset1_cmd.Prepared = true
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<%
Dim Recordset2
Dim Recordset2_cmd
Dim Recordset2_numRows
Set Recordset2_cmd = Server.CreateObject ("ADODB.Command")
Recordset2_cmd.ActiveConne ction = MM_shepherds_STRING
Recordset2_cmd.CommandText = "SELECT * FROM Product ORDER BY ProdName ASC"
Recordset2_cmd.Prepared = true
Set Recordset2 = Recordset2_cmd.Execute
Recordset2_numRows = 0
%>
<%
Dim Recordset3
Dim Recordset3_cmd
Dim Recordset3_numRows
Set Recordset3_cmd = Server.CreateObject ("ADODB.Command")
Recordset3_cmd.ActiveConne ction = MM_shepherds_STRING
Recordset3_cmd.CommandText = "SELECT * FROM Product ORDER BY ProdName ASC"
Recordset3_cmd.Prepared = true
Set Recordset3 = Recordset3_cmd.Execute
Recordset3_numRows = 0
%>
<%
Dim Recordset4__MMColParam
Recordset4__MMColParam = "1"
If (Request.QueryString("ID") <> "") Then
Recordset4__MMColParam = Request.QueryString("ID")
End If
%>
<%
Dim Recordset4
Dim Recordset4_cmd
Dim Recordset4_numRows
Set Recordset4_cmd = Server.CreateObject ("ADODB.Command")
Recordset4_cmd.ActiveConne ction = MM_shepherds_STRING
Recordset4_cmd.CommandText = "SELECT * FROM Product WHERE ID = ?"
Recordset4_cmd.Prepared = true
Recordset4_cmd.Parameters. Append Recordset4_cmd.CreateParam eter("para m1", 5, 1, -1, Recordset4__MMColParam) ' adDouble
Set Recordset4 = Recordset4_cmd.Execute
Recordset4_numRows = 0
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style4 {color: #FF0000}
-->
</style>
<script type="text/javascript"><%= pau.genera teScriptCo de()%></sc ript>
<script src="ScriptLibrary/incPU3. js" type="text/javascript"></s cript>
<head>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Shepherds Dream</title>
<link href="styles/shepherds_dre am_notfina l.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" src="csshorizontalmenu.js" ></script>
<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x= a[i])&&x.o Src;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_pre loadImages .arguments ; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&p arent.fram es.length) {
d=parent.frames[n.substrin g(p+1)].do cument; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length; i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d. layers.len gth;i++) x=MM_findObj(n,d.layers[i] .document) ;
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arg uments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+= 3)
if ((x=MM_findObj(a[i]))!=nul l){documen t.MM_sr[j+ +]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body onLoad="MM_preloadImages(' images/2bu tton1_over .gif','ima ges/2butto n2_over.gi f','images /2button3_ over.gif', 'images/2b utton4_ove r.gif')">
<div id="banner_container">
<div class="horizontalcssmenu" >
<ul id="cssmenu1" name="cssmenu1">
<li><a href="#" onMouseOut="MM_swapImgRest ore()" onMouseOver="MM_swapImage( 'Image4',' ','images/ 2button1_o ver.gif',1 )"><img src="images/2button1.gif" name="Image4" id="Image4" /><span class="arrowdiv"></span></ a>
<ul style="top: 124px; visibility: hidden;">
<li><a href="#">The People</a></li>
<li><a href="#">Philosophy and Mission</a></li>
<li><a href="#">Contact Us</a></li>
<li><a href="#">In Canada?</a></li>
</ul>
</li>
<li><a href="#" onMouseOut="MM_swapImgRest ore()" onMouseOver="MM_swapImage( 'Image5',' ','images/ 2button2_o ver.gif',1 )"><img src="images/2button2.gif" name="Image5" id="Image5" /><span class="arrowdiv"></span></ a>
<ul style="top: 124px; visibility: hidden;">
<li><a href="#">Search All Products</a></li>
<li><a href="#">Design Principles</a></li>
<li><a href="#">Product Care</a></li>
</ul>
</li>
<li><a href="#" onMouseOut="MM_swapImgRest ore()" onMouseOver="MM_swapImage( 'Image6',' ','images/ 2button3_o ver.gif',1 )"><img src="images/2button3.gif" name="Image6" id="Image6" /><span class="arrowdiv"></span></ a>
<ul style="top: 124px;left:0; visibility: hidden;">
<li><a href="#">Benefits of Wool</a></li>
<li><a href="#">Healthy Bed Checklist</a></li>
<li><a href="#">Chemical Sensitivity</a></li>
<li><a href="#">Other Resources</a></li>
</ul>
</li>
<li><a href="#" onMouseOut="MM_swapImgRest ore()" onMouseOver="MM_swapImage( 'Image7',' ','images/ 2button4_o ver.gif',1 )"><img src="images/2button4.gif" name="Image7" id="Image7" /><span class="arrowdiv"></span></ a>
<ul style="top: 124px; visibility: hidden;">
<li><a href="#">Wooldbed Materials</a></li>
<li><a href="#">Wool Industry</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="lower_container">
<div id="leftnav_container">
<h3>Online Store</h3>
<strong><br />
Product Search</strong>
<div class="navsite" >
<ul>
<li> <a href="category_summary.asp ?CatID=21" >Wool Pillows </a></li>
</ul>
</div>
<div class="navsite" >
<ul>
<li> <a href="category_summary.asp ?CatID=22" >Mattresse s </a></li>
</ul>
</div>
<div class="navsite" >
<ul>
<li> <a href="category_summary.asp ?CatID=23" >Mattress Toppers </a></li>
</ul>
</div>
<div class="navsite" >
<ul>
<li> <a href="category_summary.asp ?CatID=24" >Comforter s </a></li>
</ul>
</div>
<div class="navsite" >
<ul>
<li> <a href="category_summary.asp ?CatID=25" >Wood Frames </a></li>
</ul>
</div>
<div class="navsite" >
<ul>
<li> <a href="category_summary.asp ?CatID=26" >Raw Materials </a></li>
</ul>
</div>
<div class="navsite" >
<ul>
<li> <a href="category_summary.asp ?CatID=27" >Organic Cotton Sheets </a></li>
</ul>
</div>
<div class="inner_box"><a href="#">Request a Sample Bedding Kit </a></div>
<div class="inner_box"><a href="#">Canada Customers <br />
Click Here </a></div>
<div class="inner_box"><a href="#">Sensitivities & Wool Allergies??? </a></div>
<img src="images/color_logo.jpg " alt="Logo" width="169" height="170" /></div>
<div id="content_container">
<div class="form_objects"><a href="index.asp">Home </a>| <a href="#">Sign-In </a>| <a href="#">Cart (0)</a> | <a href="#">Call Us</a> </div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form ACTION="<%=MM_editAction%> " METHOD="post" enctype="multipart/form-da ta" name="shepherd" id="form1" onSubmit="<%=pau.submitCod e()%>;retu rn document.MM_returnValue">
<table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">Simple</div ></td>
<td><div align="center">Medium</div ></td>
<td><div align="center">Complex</di v></td>
</tr>
<tr>
<td><input <%If (CStr((Recordset4.Fields.I tem("Descr iptionType ").Value)) = CStr("1")) Then Response.Write("checked="" checked""" ) : Response.Write("")%> name="DescriptionType" type="radio" id="radio" value="1" onclick=
"document.getElementById(' div5').sty le.display = 'none';
document.getElementById('d iv6').styl e.display = 'none';
document.getElementById('d iv13').sty le.display = 'none';
document.getElementById('d iv14').sty le.display = 'none';
document.getElementById('d iv15').sty le.display = 'none';
document.getElementById('d iv16').sty le.display = 'none';
document.getElementById('d iv17').sty le.display = 'none';
document.getElementById('d iv18').sty le.display = 'none';
document.getElementById('d iv').style .display = 'block';
document.getElementById('d iv2').styl e.display = 'block';
document.getElementById('d iv3').styl e.display = 'block';
document.getElementById('d iv4').styl e.display = 'block';
document.getElementById('d iv7').styl e.display = 'block';
document.getElementById('d iv8').styl e.display = 'block';
document.getElementById('d iv9').styl e.display = 'block';
document.getElementById('d iv10').sty le.display = 'block';
document.getElementById('d iv11').sty le.display = 'block';
document.getElementById('d iv12').sty le.display = 'block';
document.getElementById('d iv28').sty le.display = 'block';
document.getElementById('d iv24').sty le.display = 'block';
document.getElementById('d iv52').sty le.display = 'block';
document.getElementById('d iv52a').st yle.displa y = 'block';
document.getElementById('d iv54').sty le.display = 'block';
document.getElementById('d iv55').sty le.display = 'block';
document.getElementById('d iv56').sty le.display = 'block';
document.getElementById('d iv57').sty le.display = 'block';
document.getElementById('d iv58').sty le.display = 'block';
document.getElementById('d iv59').sty le.display = 'block';
document.getElementById('d iv64').sty le.display = 'block';
document.getElementById('d iv65').sty le.display = 'block';
document.getElementById('d iv66').sty le.display = 'block';
document.getElementById('d iv67').sty le.display = 'block';
document.getElementById('d iv68').sty le.display = 'block';
document.getElementById('d iv69').sty le.display = 'block';
document.getElementById('d iv99').sty le.display = 'block';"/></td>
<td><input <%If (CStr((Recordset4.Fields.I tem("Descr iptionType ").Value)) = CStr("2")) Then Response.Write("checked="" checked""" ) : Response.Write("")%> name="DescriptionType" type="radio" id="DescriptionType" value="2"
onclick=
"document.getElementById(' div5').sty le.display = 'block';
document.getElementById('d iv6').styl e.display = 'none';
document.getElementById('d iv13').sty le.display = 'block';
document.getElementById('d iv14').sty le.display = 'block';
document.getElementById('d iv15').sty le.display = 'block';
document.getElementById('d iv16').sty le.display = 'block';
document.getElementById('d iv17').sty le.display = 'block';
document.getElementById('d iv24').sty le.display = 'block';
document.getElementById('d iv28').sty le.display = 'block';
document.getElementById('d iv18').sty le.display = 'block';
document.getElementById('d iv').style .display = 'block';
document.getElementById('d iv2').styl e.display = 'block';
document.getElementById('d iv3').styl e.display = 'block';
document.getElementById('d iv4').styl e.display = 'block';
document.getElementById('d iv7').styl e.display = 'block';
document.getElementById('d iv8').styl e.display = 'block';
document.getElementById('d iv9').styl e.display = 'block';
document.getElementById('d iv10').sty le.display = 'block';
document.getElementById('d iv11').sty le.display = 'block';
document.getElementById('d iv12').sty le.display = 'block';
document.getElementById('d iv52').sty le.display = 'block';
document.getElementById('d iv52a').st yle.displa y = 'block';
document.getElementById('d iv54').sty le.display = 'block';
document.getElementById('d iv55').sty le.display = 'block';
document.getElementById('d iv56').sty le.display = 'block';
document.getElementById('d iv57').sty le.display = 'block';
document.getElementById('d iv58').sty le.display = 'block';
document.getElementById('d iv59').sty le.display = 'block';
document.getElementById('d iv64').sty le.display = 'block';
document.getElementById('d iv65').sty le.display = 'block';
document.getElementById('d iv66').sty le.display = 'block';
document.getElementById('d iv67').sty le.display = 'block';
document.getElementById('d iv68').sty le.display = 'block';
document.getElementById('d iv69').sty le.display = 'block';
document.getElementById('d iv99').sty le.display = 'block';"/></td>
<td><input <%If (CStr((Recordset4.Fields.I tem("Descr iptionType ").Value)) = CStr("3")) Then Response.Write("checked="" checked""" ) : Response.Write("")%> name="DescriptionType" type="radio" id="DescriptionType" value="3" onclick=
"document.getElementById(' div5').sty le.display = 'block';
document.getElementById('d iv6').styl e.display = 'block';
document.getElementById('d iv13').sty le.display = 'block';
document.getElementById('d iv14').sty le.display = 'block';
document.getElementById('d iv15').sty le.display = 'block';
document.getElementById('d iv16').sty le.display = 'block';
document.getElementById('d iv17').sty le.display = 'block';
document.getElementById('d iv18').sty le.display = 'block';
document.getElementById('d iv').style .display = 'block';
document.getElementById('d iv2').styl e.display = 'block';
document.getElementById('d iv3').styl e.display = 'block';
document.getElementById('d iv4').styl e.display = 'block';
document.getElementById('d iv7').styl e.display = 'block';
document.getElementById('d iv8').styl e.display = 'block';
document.getElementById('d iv9').styl e.display = 'block';
document.getElementById('d iv10').sty le.display = 'block';
document.getElementById('d iv11').sty le.display = 'block';
document.getElementById('d iv12').sty le.display = 'block';
document.getElementById('d iv28').sty le.display = 'block';
document.getElementById('d iv52').sty le.display = 'block';
document.getElementById('d iv52a').st yle.displa y = 'block';
document.getElementById('d iv54').sty le.display = 'block';
document.getElementById('d iv55').sty le.display = 'block';
document.getElementById('d iv56').sty le.display = 'block';
document.getElementById('d iv99').sty le.display = 'block';
document.getElementById('d iv24').sty le.display = 'block';
document.getElementById('d iv57').sty le.display = 'block';
document.getElementById('d iv58').sty le.display = 'block';
document.getElementById('d iv59').sty le.display = 'block';
document.getElementById('d iv64').sty le.display = 'block';
document.getElementById('d iv65').sty le.display = 'block';
document.getElementById('d iv66').sty le.display = 'block';
document.getElementById('d iv67').sty le.display = 'block';
document.getElementById('d iv68').sty le.display = 'block';
document.getElementById('d iv69').sty le.display = 'block';"/></td>
</tr>
</table>
<div class="form_object4" id="div82">
<div class="form_object1" id="div">Product Category
<label>
<select name="ProdCatID" id="ProdCatID">
<option value=" " <%If (Not isNull((Recordset4.Fields. Item("Prod CatID").Va lue))) Then If (" " = CStr((Recordset4.Fields.It em("ProdCa tID").Valu e))) Then Response.Write("selected=" "selected" "") : Response.Write("")%>></opt ion>
<%
While (NOT Recordset1.EOF)
%>
<option value="<%=(Recordset1.Fiel ds.Item("C atID").Val ue)%>" <%If (Not isNull((Recordset4.Fields. Item("Prod CatID").Va lue))) Then If (CStr(Recordset1.Fields.It em("CatID" ).Value) = CStr((Recordset4.Fields.It em("ProdCa tID").Valu e))) Then Response.Write("selected=" "selected" "") : Response.Write("")%> ><%=(Recordset1.Fields.Ite m("CatName ").Value)% ></option>
<%
Recordset1.MoveNext()
Wend
If (Recordset1.CursorType > 0) Then
Recordset1.MoveFirst
Else
Recordset1.Requery
End If
%>
</select>
</label>
</div>
<div class="form_object1" id="div2">Product Name
<label>
<input name="ProdName" type="text" id="ProdName" value="<%=(Recordset4.Fiel ds.Item("P rodName"). Value)%>" />
</label>
</div>
<div class="form_object1" id="div4">1st Paragraph
<label>
<textarea name="MainParagraph" id="MainParagraph" >
<%=(Recordset4.Fields.Item ("MainPara graph").Va lue)%></te xtarea>
</label>
</div>
<div class="form_object1" id="div3">1 Line Description
<textarea name="1line_desc" id="1line_desc"><%=(Record set4.Field s.Item("1l ine_desc") .Value)%>< /textarea>
</div>
<div class="form_object3" id="div6">3rd Paragraph
<textarea name="desc3" id="desc3"> <%=(Recordset4.Fields.Item ("desc3"). Value)%></ textarea>
</div>
<div class="form_object2" id="div5">2nd Paragraph
<textarea name="desc2" id="desc2"><%=(Recordset4. Fields.Ite m("desc2") .Value)%>< /textarea>
</div>
</div>
<div class="form_object4" id="div83">
<div class="form_object1" id="div8">Bullet#1
<input name="firstbulletlistline1 " type="text" id="firstbulletlistline1" value="<%=(Recordset4.Fiel ds.Item("f irstbullet listline1" ).Value)%> " />
</div>
<div class="form_object1" id="div7">Bullet List Title (optional)
<input name="firstbulletlist" type="text" id="firstbulletlist" value="<%=(Recordset4.Fiel ds.Item("f irstbullet list").Val ue)%>" />
</div>
<div class="form_object1" id="div10">Bullet#3
<input name="firstbulletlistline3 " type="text" id="firstbulletlistline3" value="<%=(Recordset4.Fiel ds.Item("f irstbullet listline3" ).Value)%> " />
</div>
<div class="form_object1" id="div9">Bullet#2
<input name="firstbulletlistline2 " type="text" id="firstbulletlistline2" value="<%=(Recordset4.Fiel ds.Item("f irstbullet listline2" ).Value)%> " />
</div>
<div class="form_object1" id="div12">Bullet#5 (optional)
<input name="firstbulletlistline5 " type="text" id="firstbulletlistline5" value="<%=(Recordset4.Fiel ds.Item("f irstbullet listline5" ).Value)%> " />
</div>
<div class="form_object1" id="div11">Bullet#4 (optional)
<input name="firstbulletlistline4 " type="text" id="firstbulletlistline4" value="<%=(Recordset4.Fiel ds.Item("f irstbullet listline4" ).Value)%> " />
</div>
</div>
<div class="form_object4" id="div84">
<div class="form_object2" id="div14">Bullet#1 (optional)
<input name="secondbulletlistline 1" type="text" id="secondbulletlistline1" value="<%=(Recordset4.Fiel ds.Item("s econdbulle tlistline1 ").Value)% >" />
</div>
<div class="form_object2" id="div13">Bullet List#2 Title (optional)
<input name="secondbulletlist" type="text" id="secondbulletlist" value="<%=(Recordset4.Fiel ds.Item("s econdbulle tlist").Va lue)%>" />
</div>
<div class="form_object2" id="div16">Bullet#3 (optional)
<input name="secondbulletlistline 3" type="text" id="secondbulletlistline3" value="<%=(Recordset4.Fiel ds.Item("s econdbulle tlistline3 ").Value)% >" />
</div>
<div class="form_object2" id="div15">Bullet#2 (optional)
<input name="secondbulletlistline 2" type="text" id="secondbulletlistline2" value="<%=(Recordset4.Fiel ds.Item("s econdbulle tlistline2 ").Value)% >" />
</div>
<div class="form_object2" id="div18">Bullet#5 (optional)
<input name="secondbulletlistline 5" type="text" id="secondbulletlistline5" value="<%=(Recordset4.Fiel ds.Item("s econdbulle tlistline5 ").Value)% >" />
</div>
<div class="form_object2" id="div17">Bullet#4 (optional)
<input name="secondbulletlistline 4" type="text" id="secondbulletlistline4" value="<%=(Recordset4.Fiel ds.Item("s econdbulle tlistline4 ").Value)% >" />
</div>
</div>
<div class="form_object4" id="div85">
<div class="form_object2" id="div24">Sizes?
<table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">Yes</div></ td>
<td><div align="center">No</div></t d>
</tr>
<tr>
<td><input <%If (CStr((Recordset4.Fields.I tem("Sizes YesNo").Va lue)) = CStr("Yes")) Then Response.Write("checked="" checked""" ) : Response.Write("")%> name="SizesYesNo" type="radio" id="SizesYesNo" value="Yes" /></td>
<td><input <%If (CStr((Recordset4.Fields.I tem("Sizes YesNo").Va lue)) = CStr("No")) Then Response.Write("checked="" checked""" ) : Response.Write("")%> name="SizesYesNo" type="radio" id="SizesYesNo" value="No" /></td>
</tr>
</table>
</div>
<div class="form_object2" id="div99">Priced From: $
<label></label>
<input name="PricedFrom" type="text" value="<%=(Recordset4.Fiel ds.Item("P ricedFrom" ).Value)%> " />
</div>
</div>
<div class="form_object4" id="div86">
<div class="form_object1" id="div53">Special Shipping Price
<input name="SpecialShippingAmoun t" type="text" id="SpecialShippingAmount" value="<%=(Recordset4.Fiel ds.Item("S pecialShip pingAmount ").Value)% >" />
</div>
<div class="form_object1" id="div52a">Special Shipping?
<table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">Yes</div></ td>
<td><div align="center">No</div></t d>
</tr>
<tr>
<td><input <%If (CStr((Recordset4.Fields.I tem("Speci alShipping YesNo").Va lue)) = CStr("Yes")) Then Response.Write("checked="" checked""" ) : Response.Write("")%> name="SpecialShippingYesNo " type="radio" id="SpecialShippingYesNo" value="Yes" onclick=
"document.getElementById(' div53').st yle.displa y = 'block';" /></td>
<td><input <%If (CStr((Recordset4.Fields.I tem("Speci alShipping YesNo").Va lue)) = CStr("No")) Then Response.Write("checked="" checked""" ) : Response.Write("")%> name="SpecialShippingYesNo " type="radio" id="SpecialShippingYesNo"
value="No" onclick=
"document.getElementById(' div53').st yle.displa y = 'none'; "/></td>
</tr>
</table>
</div>
</div>
<div class="form_object4" id="div90">
<div class="form_object1" id="div52">Featured?
<table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">Yes</div></ td>
<td><div align="center">No</div></t d>
</tr>
<tr>
<td><input <%If (CStr((Recordset4.Fields.I tem("Featu redYesNo") .Value)) = CStr("Yes")) Then Response.Write("checked="" checked""" ) : Response.Write("")%> name="FeaturedYesNo" type="radio" id="FeaturedYesNo" value="Yes" /></td>
<td><input <%If (CStr((Recordset4.Fields.I tem("Featu redYesNo") .Value)) = CStr("No")) Then Response.Write("checked="" checked""" ) : Response.Write("")%> name="FeaturedYesNo" type="radio" id="FeaturedYesNo"
value="No" checked="checked"/></td>
</tr>
</table>
</div>
<div class="form_object1" id="div54">Care Page
<table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">Page1</div> </td>
<td><div align="center">Page2</div> </td>
</tr>
<tr>
<td><input <%If (CStr((Recordset4.Fields.I tem("CareP age12").Va lue)) = CStr("Yes")) Then Response.Write("checked="" checked""" ) : Response.Write("")%> name="CarePage12" type="radio" id="CarePage12" value="Yes" /></td>
<td><input <%If (CStr((Recordset4.Fields.I tem("CareP age12").Va lue)) = CStr("No")) Then Response.Write("checked="" checked""" ) : Response.Write("")%> name="CarePage12" type="radio" id="CarePage12"
value="No"/></td>
</tr>
</table>
</div>
</div>
<div class="form_object4" id="div80">
<div class="form_object1" id="div57">Optional Link
<input name="OptionalPageLink" type="text" id="OptionalPageLink" value="<%=(Recordset4.Fiel ds.Item("O ptionalPag eLink").Va lue)%>" />
</div>
<div class="form_object1" id="div58">Packaging Charge?
<input name="PackagingCharge" type="text" id="PackagingCharge" value="<%=(Recordset4.Fiel ds.Item("P ackagingCh arge").Val ue)%>" />
</div>
<div class="form_object1" id="div59">Text of Optional Link
<input name="OptionalPageLinkText " type="text" id="OptionalPageLinkText" value="<%=(Recordset4.Fiel ds.Item("O ptionalPag eLinkText" ).Value)%> " />
</div>
<div class="form_object1" id="div56">On Sale?
<table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">Yes</div></ td>
<td><div align="center">No</div></t d>
</tr>
<tr>
<td><input <%If (CStr((Recordset4.Fields.I tem("OnSal eYesNo").V alue)) = CStr("Yes")) Then Response.Write("checked="" checked""" ) : Response.Write("")%> name="OnSaleYesNo" type="radio" id="OnSaleYesNo" value="Yes" /></td>
<td><input <%If (CStr((Recordset4.Fields.I tem("OnSal eYesNo").V alue)) = CStr("No")) Then Response.Write("checked="" checked""" ) : Response.Write("")%> name="OnSaleYesNo" type="radio" id="OnSaleYesNo" value="No" /></td>
</tr>
</table>
</div>
<div class="form_object1" id="div28">Recommended Add2
<label>
<select name="RecommendedAdd2" id="RecommendedAdd2">
<option value=" " <%If (Not isNull((Recordset4.Fields. Item("Reco mmendedAdd 2").Value) )) Then If (" " = CStr((Recordset4.Fields.It em("Recomm endedAdd2" ).Value))) Then Response.Write("selected=" "selected" "") : Response.Write("")%>></opt ion>
<%
While (NOT Recordset3.EOF)
%>
<option value="<%=(Recordset3.Fiel ds.Item("I D").Value) %>" <%If (Not isNull((Recordset4.Fields. Item("Reco mmendedAdd 2").Value) )) Then If (CStr(Recordset3.Fields.It em("ID").V alue) = CStr((Recordset4.Fields.It em("Recomm endedAdd2" ).Value))) Then Response.Write("selected=" "selected" "") : Response.Write("")%> ><%=(Recordset3.Fields.Ite m("ProdNam e").Value) %></option >
<%
Recordset3.MoveNext()
Wend
If (Recordset3.CursorType > 0) Then
Recordset3.MoveFirst
Else
Recordset3.Requery
End If
%>
</select>
</label>
</div>
<div class="form_object1" id="div55">Recommended Add1
<select name="RecommendedAdd1" id="RecommendedAdd1">
<option value=" " <%If (Not isNull((Recordset4.Fields. Item("Reco mmendedAdd 1").Value) )) Then If (" " = CStr((Recordset4.Fields.It em("Recomm endedAdd1" ).Value))) Then Response.Write("selected=" "selected" "") : Response.Write("")%>></opt ion>
<%
While (NOT Recordset2.EOF)
%>
<option value="<%=(Recordset2.Fiel ds.Item("I D").Value) %>" <%If (Not isNull((Recordset4.Fields. Item("Reco mmendedAdd 1").Value) )) Then If (CStr(Recordset2.Fields.It em("ID").V alue) = CStr((Recordset4.Fields.It em("Recomm endedAdd1" ).Value))) Then Response.Write("selected=" "selected" "") : Response.Write("")%> ><%=(Recordset2.Fields.Ite m("ProdNam e").Value) %></option >
<%
Recordset2.MoveNext()
Wend
If (Recordset2.CursorType > 0) Then
Recordset2.MoveFirst
Else
Recordset2.Requery
End If
%>
</select>
</div>
</div>
<div class="form_object4" id="div81">
<div class="form_object1" id="div69">Shipping Details
<label></label>
<label>
<input name="ShipsBy" type="text" id="ShipsBy" value="<%=(Recordset4.Fiel ds.Item("S hipsBy").V alue)%>" />
</label>
</div>
<div class="form_object1" id="div64">Image 1 <span class="style4">
<label> </label>
</span>
<label>
<input name="image1" type="file" id="image1" onChange="<%=pau.validateC ode()%>;re turn document.MM_returnValue" value="<%=(Recordset4.Fiel ds.Item("I mage1").Va lue)%>" />
</label>
</div>
<div class="form_object1" id="div66">Image 4
<input name="image4" type="file" id="image4" onChange="<%=pau.validateC ode()%>;re turn document.MM_returnValue" value="<%=(Recordset4.Fiel ds.Item("I mage4").Va lue)%>" />
</div>
<div class="form_object1" id="div65">Image 2
<input name="image2" type="file" id="image2" onChange="<%=pau.validateC ode()%>;re turn document.MM_returnValue" value="<%=(Recordset4.Fiel ds.Item("I mage2").Va lue)%>" />
</div>
<div class="form_object1" id="div68">Image 5
<input name="image5" type="file" id="image5" onChange="<%=pau.validateC ode()%>;re turn document.MM_returnValue" value="<%=(Recordset4.Fiel ds.Item("I mage5").Va lue)%>" />
</div>
<div class="form_object1" id="div67">Image 3
<input name="image3" type="file" id="image3" onChange="<%=pau.validateC ode()%>;re turn document.MM_returnValue" value="<%=(Recordset4.Fiel ds.Item("I mage3").Va lue)%>" />
</div>
</div>
<label>
<input type="submit" name="Submit" value="Submit" />
</label>
<input type="hidden" name="MM_update" value="shepherd" />
<input type="hidden" name="MM_recordId" value="<%= Recordset4.Fields.Item("ID ").Value %>" />
<input type="hidden" name="upload_org_image1" value="<%=(Recordset4.Fiel ds.Item("I mage1").Va lue)%>" />
<input type="hidden" name="upload_org_image4" value="<%=(Recordset4.Fiel ds.Item("I mage4").Va lue)%>" />
<input type="hidden" name="upload_org_image2" value="<%=(Recordset4.Fiel ds.Item("I mage2").Va lue)%>" />
<input type="hidden" name="upload_org_image5" value="<%=(Recordset4.Fiel ds.Item("I mage5").Va lue)%>" />
<input type="hidden" name="upload_org_image3" value="<%=(Recordset4.Fiel ds.Item("I mage3").Va lue)%>" />
</form> </td>
</tr>
</table>
<div align="left"><a href="#">Shop Online</a> | <a href="#">Our Story</a> | <a href="#">Contact Us</a> | <a href="#">Our Products</a> | <a href="#">FAQ</a> | <a href="#">Testimonials </a></div>
</div>
<a href="signed_in.asp"><img src="images/image_spacer.j pg" alt="1" /></a></div>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
<%
Recordset3.Close()
Set Recordset3 = Nothing
%>
<%
Recordset4.Close()
Set Recordset4 = Nothing
%>
I have an aspVB page built in Dreamweaver using DMXZone's ASP Upload 3 and Smart Image Processor 2 on multiple image file fields - the form is an update record form that correctly captures and updates every value except the file fields.
If a user uploads a new picture every time, the system works perfectly. However, if a user decides not to upload a new picture (say they just want to change the name or price) the existing image record in the database gets overwritten with a blank value.
DXMZone's own content indicates that to solve this, all you need to do is bind the image field record to the image upload field in the form and then if no new image is selected, it will capture the old image db value and proceed.
But this doesn't work.
Can anyone guess as to why this form is behaving as described? Sorry the code is so long, but it's a complex form. I believe the critical code in question is on the image field itself and a hidden file field as well:
<label>
<input name="image1" type="file" id="image1" onChange="<%=pau.validateC
</label>
and here is the hidden field:
<input type="hidden" name="upload_org_image1" value="<%=(Recordset4.Fiel
But the full code may shed some light on what is happening if you are an ASP or VB expert (or DMX Zone expert).
Here is the full code:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/shepherd
<!--#include file="ScriptLibrary/incPU3
<!--#include file="ScriptLibrary/incPU3
<%
'*** Pure ASP File Upload 3.0.9
' Process form shepherd
Dim pau, DMX_uploadAction, UploadRequest, UploadQueryString, pau_thePath, pau_nameConflict, pau_saveWidth, pau_saveHeight
Set pau = new PureUpload
pau.ScriptLibrary = "ScriptLibrary"
pau.MaxSize = 20000
pau.ConflictHandling = "over"
pau.StoreType = "file"
pau.ProgressTemplate = "vista_look.htm"
pau.ProgressWidth = 300
pau.ProgressHeight = 100
pau.UploadFolder = """Uploads"""
pau.AllowedExtensions = "GIF,JPG,JPEG,BMP,PNG" ' "images"
pau.MaxFileSize = 10000
pau.ProcessUpload
pau.SaveAll
%>
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariabl
If (UploadQueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(UploadQu
End If
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
If condition = "" Then
MM_IIf = ifFalse
Else
MM_IIf = ifTrue
End If
End Function
%>
<%
If (CStr(UploadFormRequest("M
If (Not MM_abortEdit) Then
' execute the update
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnectio
MM_editCmd.CommandText = "UPDATE Product SET DescriptionType = ?, ProdCatID = ?, ProdName = ?, MainParagraph = ?, [1line_desc] = ?, desc3 = ?, desc2 = ?, firstbulletlistline1 = ?, firstbulletlist = ?, firstbulletlistline3 = ?, firstbulletlistline2 = ?, firstbulletlistline5 = ?, firstbulletlistline4 = ?, secondbulletlistline1 = ?, secondbulletlist = ?, secondbulletlistline3 = ?, secondbulletlistline2 = ?, secondbulletlistline5 = ?, secondbulletlistline4 = ?, SizesYesNo = ?, PricedFrom = ?, SpecialShippingAmount = ?, SpecialShippingYesNo = ?, FeaturedYesNo = ?, CarePage12 = ?, OptionalPageLink = ?, PackagingCharge = ?, OptionalPageLinkText = ?, OnSaleYesNo = ?, RecommendedAdd2 = ?, RecommendedAdd1 = ?, ShipsBy = ?, Image1 = ?, Image4 = ?, Image2 = ?, Image5 = ?, Image3 = ? WHERE ID = ?"
MM_editCmd.Prepared = true
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Parameters.Appe
MM_editCmd.Execute
MM_editCmd.ActiveConnectio
' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "add_sizes.asp"
If (UploadQueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & UploadQueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & UploadQueryString
End If
End If
Response.Redirect(MM_editR
End If
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConne
Recordset1_cmd.CommandText
Recordset1_cmd.Prepared = true
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<%
Dim Recordset2
Dim Recordset2_cmd
Dim Recordset2_numRows
Set Recordset2_cmd = Server.CreateObject ("ADODB.Command")
Recordset2_cmd.ActiveConne
Recordset2_cmd.CommandText
Recordset2_cmd.Prepared = true
Set Recordset2 = Recordset2_cmd.Execute
Recordset2_numRows = 0
%>
<%
Dim Recordset3
Dim Recordset3_cmd
Dim Recordset3_numRows
Set Recordset3_cmd = Server.CreateObject ("ADODB.Command")
Recordset3_cmd.ActiveConne
Recordset3_cmd.CommandText
Recordset3_cmd.Prepared = true
Set Recordset3 = Recordset3_cmd.Execute
Recordset3_numRows = 0
%>
<%
Dim Recordset4__MMColParam
Recordset4__MMColParam = "1"
If (Request.QueryString("ID")
Recordset4__MMColParam = Request.QueryString("ID")
End If
%>
<%
Dim Recordset4
Dim Recordset4_cmd
Dim Recordset4_numRows
Set Recordset4_cmd = Server.CreateObject ("ADODB.Command")
Recordset4_cmd.ActiveConne
Recordset4_cmd.CommandText
Recordset4_cmd.Prepared = true
Recordset4_cmd.Parameters.
Set Recordset4 = Recordset4_cmd.Execute
Recordset4_numRows = 0
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style4 {color: #FF0000}
-->
</style>
<script type="text/javascript"><%=
<script src="ScriptLibrary/incPU3.
<head>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Shepherds Dream</title>
<link href="styles/shepherds_dre
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" src="csshorizontalmenu.js"
<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_pre
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&p
d=parent.frames[n.substrin
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;
for(i=0;!x&&d.layers&&i<d.
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arg
if ((x=MM_findObj(a[i]))!=nul
}
//-->
</script>
</head>
<body onLoad="MM_preloadImages('
<div id="banner_container">
<div class="horizontalcssmenu" >
<ul id="cssmenu1" name="cssmenu1">
<li><a href="#" onMouseOut="MM_swapImgRest
<ul style="top: 124px; visibility: hidden;">
<li><a href="#">The People</a></li>
<li><a href="#">Philosophy and Mission</a></li>
<li><a href="#">Contact Us</a></li>
<li><a href="#">In Canada?</a></li>
</ul>
</li>
<li><a href="#" onMouseOut="MM_swapImgRest
<ul style="top: 124px; visibility: hidden;">
<li><a href="#">Search All Products</a></li>
<li><a href="#">Design Principles</a></li>
<li><a href="#">Product Care</a></li>
</ul>
</li>
<li><a href="#" onMouseOut="MM_swapImgRest
<ul style="top: 124px;left:0; visibility: hidden;">
<li><a href="#">Benefits of Wool</a></li>
<li><a href="#">Healthy Bed Checklist</a></li>
<li><a href="#">Chemical Sensitivity</a></li>
<li><a href="#">Other Resources</a></li>
</ul>
</li>
<li><a href="#" onMouseOut="MM_swapImgRest
<ul style="top: 124px; visibility: hidden;">
<li><a href="#">Wooldbed Materials</a></li>
<li><a href="#">Wool Industry</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="lower_container">
<div id="leftnav_container">
<h3>Online Store</h3>
<strong><br />
Product Search</strong>
<div class="navsite" >
<ul>
<li> <a href="category_summary.asp
</ul>
</div>
<div class="navsite" >
<ul>
<li> <a href="category_summary.asp
</ul>
</div>
<div class="navsite" >
<ul>
<li> <a href="category_summary.asp
</ul>
</div>
<div class="navsite" >
<ul>
<li> <a href="category_summary.asp
</ul>
</div>
<div class="navsite" >
<ul>
<li> <a href="category_summary.asp
</ul>
</div>
<div class="navsite" >
<ul>
<li> <a href="category_summary.asp
</ul>
</div>
<div class="navsite" >
<ul>
<li> <a href="category_summary.asp
</ul>
</div>
<div class="inner_box"><a href="#">Request a Sample Bedding Kit </a></div>
<div class="inner_box"><a href="#">Canada Customers <br />
Click Here </a></div>
<div class="inner_box"><a href="#">Sensitivities & Wool Allergies??? </a></div>
<img src="images/color_logo.jpg
<div id="content_container">
<div class="form_objects"><a href="index.asp">Home </a>| <a href="#">Sign-In </a>| <a href="#">Cart (0)</a> | <a href="#">Call Us</a> </div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form ACTION="<%=MM_editAction%>
<table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">Simple</div
<td><div align="center">Medium</div
<td><div align="center">Complex</di
</tr>
<tr>
<td><input <%If (CStr((Recordset4.Fields.I
"document.getElementById('
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
<td><input <%If (CStr((Recordset4.Fields.I
onclick=
"document.getElementById('
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
<td><input <%If (CStr((Recordset4.Fields.I
"document.getElementById('
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
document.getElementById('d
</tr>
</table>
<div class="form_object4" id="div82">
<div class="form_object1" id="div">Product Category
<label>
<select name="ProdCatID" id="ProdCatID">
<option value=" " <%If (Not isNull((Recordset4.Fields.
<%
While (NOT Recordset1.EOF)
%>
<option value="<%=(Recordset1.Fiel
<%
Recordset1.MoveNext()
Wend
If (Recordset1.CursorType > 0) Then
Recordset1.MoveFirst
Else
Recordset1.Requery
End If
%>
</select>
</label>
</div>
<div class="form_object1" id="div2">Product Name
<label>
<input name="ProdName" type="text" id="ProdName" value="<%=(Recordset4.Fiel
</label>
</div>
<div class="form_object1" id="div4">1st Paragraph
<label>
<textarea name="MainParagraph" id="MainParagraph" >
<%=(Recordset4.Fields.Item
</label>
</div>
<div class="form_object1" id="div3">1 Line Description
<textarea name="1line_desc" id="1line_desc"><%=(Record
</div>
<div class="form_object3" id="div6">3rd Paragraph
<textarea name="desc3" id="desc3"> <%=(Recordset4.Fields.Item
</div>
<div class="form_object2" id="div5">2nd Paragraph
<textarea name="desc2" id="desc2"><%=(Recordset4.
</div>
</div>
<div class="form_object4" id="div83">
<div class="form_object1" id="div8">Bullet#1
<input name="firstbulletlistline1
</div>
<div class="form_object1" id="div7">Bullet List Title (optional)
<input name="firstbulletlist" type="text" id="firstbulletlist" value="<%=(Recordset4.Fiel
</div>
<div class="form_object1" id="div10">Bullet#3
<input name="firstbulletlistline3
</div>
<div class="form_object1" id="div9">Bullet#2
<input name="firstbulletlistline2
</div>
<div class="form_object1" id="div12">Bullet#5 (optional)
<input name="firstbulletlistline5
</div>
<div class="form_object1" id="div11">Bullet#4 (optional)
<input name="firstbulletlistline4
</div>
</div>
<div class="form_object4" id="div84">
<div class="form_object2" id="div14">Bullet#1 (optional)
<input name="secondbulletlistline
</div>
<div class="form_object2" id="div13">Bullet List#2 Title (optional)
<input name="secondbulletlist" type="text" id="secondbulletlist" value="<%=(Recordset4.Fiel
</div>
<div class="form_object2" id="div16">Bullet#3 (optional)
<input name="secondbulletlistline
</div>
<div class="form_object2" id="div15">Bullet#2 (optional)
<input name="secondbulletlistline
</div>
<div class="form_object2" id="div18">Bullet#5 (optional)
<input name="secondbulletlistline
</div>
<div class="form_object2" id="div17">Bullet#4 (optional)
<input name="secondbulletlistline
</div>
</div>
<div class="form_object4" id="div85">
<div class="form_object2" id="div24">Sizes?
<table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">Yes</div></
<td><div align="center">No</div></t
</tr>
<tr>
<td><input <%If (CStr((Recordset4.Fields.I
<td><input <%If (CStr((Recordset4.Fields.I
</tr>
</table>
</div>
<div class="form_object2" id="div99">Priced From: $
<label></label>
<input name="PricedFrom" type="text" value="<%=(Recordset4.Fiel
</div>
</div>
<div class="form_object4" id="div86">
<div class="form_object1" id="div53">Special Shipping Price
<input name="SpecialShippingAmoun
</div>
<div class="form_object1" id="div52a">Special Shipping?
<table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">Yes</div></
<td><div align="center">No</div></t
</tr>
<tr>
<td><input <%If (CStr((Recordset4.Fields.I
"document.getElementById('
<td><input <%If (CStr((Recordset4.Fields.I
value="No" onclick=
"document.getElementById('
</tr>
</table>
</div>
</div>
<div class="form_object4" id="div90">
<div class="form_object1" id="div52">Featured?
<table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">Yes</div></
<td><div align="center">No</div></t
</tr>
<tr>
<td><input <%If (CStr((Recordset4.Fields.I
<td><input <%If (CStr((Recordset4.Fields.I
value="No" checked="checked"/></td>
</tr>
</table>
</div>
<div class="form_object1" id="div54">Care Page
<table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">Page1</div>
<td><div align="center">Page2</div>
</tr>
<tr>
<td><input <%If (CStr((Recordset4.Fields.I
<td><input <%If (CStr((Recordset4.Fields.I
value="No"/></td>
</tr>
</table>
</div>
</div>
<div class="form_object4" id="div80">
<div class="form_object1" id="div57">Optional Link
<input name="OptionalPageLink" type="text" id="OptionalPageLink" value="<%=(Recordset4.Fiel
</div>
<div class="form_object1" id="div58">Packaging Charge?
<input name="PackagingCharge" type="text" id="PackagingCharge" value="<%=(Recordset4.Fiel
</div>
<div class="form_object1" id="div59">Text of Optional Link
<input name="OptionalPageLinkText
</div>
<div class="form_object1" id="div56">On Sale?
<table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">Yes</div></
<td><div align="center">No</div></t
</tr>
<tr>
<td><input <%If (CStr((Recordset4.Fields.I
<td><input <%If (CStr((Recordset4.Fields.I
</tr>
</table>
</div>
<div class="form_object1" id="div28">Recommended Add2
<label>
<select name="RecommendedAdd2" id="RecommendedAdd2">
<option value=" " <%If (Not isNull((Recordset4.Fields.
<%
While (NOT Recordset3.EOF)
%>
<option value="<%=(Recordset3.Fiel
<%
Recordset3.MoveNext()
Wend
If (Recordset3.CursorType > 0) Then
Recordset3.MoveFirst
Else
Recordset3.Requery
End If
%>
</select>
</label>
</div>
<div class="form_object1" id="div55">Recommended Add1
<select name="RecommendedAdd1" id="RecommendedAdd1">
<option value=" " <%If (Not isNull((Recordset4.Fields.
<%
While (NOT Recordset2.EOF)
%>
<option value="<%=(Recordset2.Fiel
<%
Recordset2.MoveNext()
Wend
If (Recordset2.CursorType > 0) Then
Recordset2.MoveFirst
Else
Recordset2.Requery
End If
%>
</select>
</div>
</div>
<div class="form_object4" id="div81">
<div class="form_object1" id="div69">Shipping Details
<label></label>
<label>
<input name="ShipsBy" type="text" id="ShipsBy" value="<%=(Recordset4.Fiel
</label>
</div>
<div class="form_object1" id="div64">Image 1 <span class="style4">
<label> </label>
</span>
<label>
<input name="image1" type="file" id="image1" onChange="<%=pau.validateC
</label>
</div>
<div class="form_object1" id="div66">Image 4
<input name="image4" type="file" id="image4" onChange="<%=pau.validateC
</div>
<div class="form_object1" id="div65">Image 2
<input name="image2" type="file" id="image2" onChange="<%=pau.validateC
</div>
<div class="form_object1" id="div68">Image 5
<input name="image5" type="file" id="image5" onChange="<%=pau.validateC
</div>
<div class="form_object1" id="div67">Image 3
<input name="image3" type="file" id="image3" onChange="<%=pau.validateC
</div>
</div>
<label>
<input type="submit" name="Submit" value="Submit" />
</label>
<input type="hidden" name="MM_update" value="shepherd" />
<input type="hidden" name="MM_recordId" value="<%= Recordset4.Fields.Item("ID
<input type="hidden" name="upload_org_image1" value="<%=(Recordset4.Fiel
<input type="hidden" name="upload_org_image4" value="<%=(Recordset4.Fiel
<input type="hidden" name="upload_org_image2" value="<%=(Recordset4.Fiel
<input type="hidden" name="upload_org_image5" value="<%=(Recordset4.Fiel
<input type="hidden" name="upload_org_image3" value="<%=(Recordset4.Fiel
</form> </td>
</tr>
</table>
<div align="left"><a href="#">Shop Online</a> | <a href="#">Our Story</a> | <a href="#">Contact Us</a> | <a href="#">Our Products</a> | <a href="#">FAQ</a> | <a href="#">Testimonials </a></div>
</div>
<a href="signed_in.asp"><img src="images/image_spacer.j
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
<%
Recordset3.Close()
Set Recordset3 = Nothing
%>
<%
Recordset4.Close()
Set Recordset4 = Nothing
%>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks - didn't know you could do that =)
Here is the hidden value:
<label>
<input name="image1" type="file" id="image1" onchange="validateFile(thi s, 'GIF,JPG,JPEG,BMP,PNG', false);return document.MM_returnValue" value="19_latexpadded.jpg" />
</label>
Here is the hidden value:
<label>
<input name="image1" type="file" id="image1" onchange="validateFile(thi
</label>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ack
Here it is:
<input type="hidden" name="upload_org_image1" value="" />
<input type="hidden" name="upload_org_image4" value="" />
<input type="hidden" name="upload_org_image2" value="" />
<input type="hidden" name="upload_org_image5" value="" />
<input type="hidden" name="upload_org_image3" value="" />
Now...I once tried, on another page to use the same value from the same db field twice in a page and it kept only giving me the first instance of the value. I had to create a separate object and define it as that field value in order to reuse it. Am I on the right track here?
Trying to find the syntax the other time I did this - searching files...
Bill
Here it is:
<input type="hidden" name="upload_org_image1" value="" />
<input type="hidden" name="upload_org_image4" value="" />
<input type="hidden" name="upload_org_image2" value="" />
<input type="hidden" name="upload_org_image5" value="" />
<input type="hidden" name="upload_org_image3" value="" />
Now...I once tried, on another page to use the same value from the same db field twice in a page and it kept only giving me the first instance of the value. I had to create a separate object and define it as that field value in order to reuse it. Am I on the right track here?
Trying to find the syntax the other time I did this - searching files...
Bill
So for some reason when the form loads, the hidden fields are not being populated with the original image names. Therefore these blanks are being saved as NULL values.
Can you also tell me the VALUE when the page is run of this form field (approx line 662):
<input name="image1" type="file" id="image1" onChange="<%=pau.validateC ode()%>;re turn document.MM_returnValue" value="<%=(Recordset4.Fiel ds.Item("I mage1").Va lue)%>" />
^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^
This will check if RecordSet4 is working properly, as it seems to be the same recordset that populates the entire form.
Can you also tell me the VALUE when the page is run of this form field (approx line 662):
<input name="image1" type="file" id="image1" onChange="<%=pau.validateC
^^^^^^^^^^^^^^^^^^^^^^^^^^
This will check if RecordSet4 is working properly, as it seems to be the same recordset that populates the entire form.
ASKER
Hi
Recordset 4 was working properly - the issue was reuse of the same db value in the same recordset, which does not appear to work.
Instead I defined 5 new objects (variables?):
<%
pic1 = (Recordset4.Fields.Item("I mage1").Va lue)
pic2 = (Recordset4.Fields.Item("I mage2").Va lue)
pic3 = (Recordset4.Fields.Item("I mage3").Va lue)
pic4 = (Recordset4.Fields.Item("I mage4").Va lue)
pic5 = (Recordset4.Fields.Item("I mage5").Va lue)
%>
Then in the multiple locations I needed to pull up the same value from the same db field, I don't have to do another recordset - instead, I just use <%=pic1%>
This did it - but it never occurred to me to view source for dynamic data (maybe this is really basic lol) - that's a great tip either way!
Thanks
Bill
Recordset 4 was working properly - the issue was reuse of the same db value in the same recordset, which does not appear to work.
Instead I defined 5 new objects (variables?):
<%
pic1 = (Recordset4.Fields.Item("I
pic2 = (Recordset4.Fields.Item("I
pic3 = (Recordset4.Fields.Item("I
pic4 = (Recordset4.Fields.Item("I
pic5 = (Recordset4.Fields.Item("I
%>
Then in the multiple locations I needed to pull up the same value from the same db field, I don't have to do another recordset - instead, I just use <%=pic1%>
This did it - but it never occurred to me to view source for dynamic data (maybe this is really basic lol) - that's a great tip either way!
Thanks
Bill
Bill. The solution you've chosen is about the only way to overcome your issue. It's a pity that these basic limitations in ASP aren't communicated enough!
Thanks for the points anyway.
Thanks for the points anyway.
ASKER
Nah - I appreciated the direction you sent me in - and the real culprit here is probably DMXZone, although they imply that this is something unique with my situation.
One final question I would have:
I'm trying to break away from plug-ins and build/steal the code I need manually, which will hopefully help me understand all of this better than clicking through a few GUIs does. Do you have any recommendation for resources to manually produce file uploads, including image resizing, watermarks, etc?
DMXZone's plug-in is using the AspJpeg server component, but I believe we have .NET capabilities with our new dedicated server as well.
Any advice there would be much appreciated.
Cheers in any case!
Bill
One final question I would have:
I'm trying to break away from plug-ins and build/steal the code I need manually, which will hopefully help me understand all of this better than clicking through a few GUIs does. Do you have any recommendation for resources to manually produce file uploads, including image resizing, watermarks, etc?
DMXZone's plug-in is using the AspJpeg server component, but I believe we have .NET capabilities with our new dedicated server as well.
Any advice there would be much appreciated.
Cheers in any case!
Bill
>> Do you have any recommendation for resources to manually produce file uploads, including image resizing, watermarks, etc?
Yes, but it involves taking a step backwards for you. ASP is now well out of date with regards to the functionality modern web apps should provide. For this reason, I always recommend a move to ASP.NET
It is a big step, but the power that you get from .NET is unbelievable. The .NET framework is basically a collection of thousands of pre-written code chunks that you can use, for free, in your application. There is a built-in file uploader, and also an image processor that will do exactly what you need.
Classic ASP can't do this sort of thing without using DLL's that need registering on the server, and its a total pain. In ASP.NET if you need to use a DLL you just drop it in a folder and all of it's functionality becomes instantly available - not that you would need to do this probably.
The only downsides are the initilal learning curve, and the slightly higher price for hosting compared with ASP Classic.
Yes, but it involves taking a step backwards for you. ASP is now well out of date with regards to the functionality modern web apps should provide. For this reason, I always recommend a move to ASP.NET
It is a big step, but the power that you get from .NET is unbelievable. The .NET framework is basically a collection of thousands of pre-written code chunks that you can use, for free, in your application. There is a built-in file uploader, and also an image processor that will do exactly what you need.
Classic ASP can't do this sort of thing without using DLL's that need registering on the server, and its a total pain. In ASP.NET if you need to use a DLL you just drop it in a folder and all of it's functionality becomes instantly available - not that you would need to do this probably.
The only downsides are the initilal learning curve, and the slightly higher price for hosting compared with ASP Classic.
ASKER
So the database fields being overwritten are Image1, Image2, etc - I think this block of code is supposed to be helping prevent that from happening:
<input type="hidden" name="upload_org_image1" value="<%=(Recordset4.Fiel
<input type="hidden" name="upload_org_image4" value="<%=(Recordset4.Fiel
<input type="hidden" name="upload_org_image2" value="<%=(Recordset4.Fiel
<input type="hidden" name="upload_org_image5" value="<%=(Recordset4.Fiel
<input type="hidden" name="upload_org_image3" value="<%=(Recordset4.Fiel
Bill