for dynamic handling the formfields, I create the input-field (inpFoo) with default value. Later in the code I have to change the value of this field to ‘bar’.
I find out, in the IE (6) I can’t call the form fields by document.getElementsByName('inpFoo), because the name-Attribut is not supportet by input-fields in IE. So, I have the Problem fixed with add the code
field.id = name
in dhtmlxvault.js on function setFormField().
First off, the picture gets to be uploaded into the catagory (good)
The Messagebox Alerts an Error: False even due to the upload function is working fine.
Here is where it does not work anymore:
The webpage does not stop Loading after clicked on the Messagebox
The Parameter ‘Promocode’ Does not get to be added into the database
vault.onFileUploaded = function (file) { alert(“id:” + file.id + “,name:” + file.name + “,uploaded:” + file.name+ “,error:” + file.error); };
vault.create(“vault1”);
vault.getFormField(“promocode”, “SITX9”);
vault.setFormField(“uploadID”, null); // will remove this field from the form
UploadHandler.ashx
finally
{
SqlConnection connection = new SqlConnection("Data Source=localhost;Initial Catalog=xxx; user ID=xxxx; password=xxxxx");
connection.Open();
string sqlquery = ("INSERT INTO Upload VALUES('" + context.Request.Form["promocode"] + "','" + context.Request["fileName"] + "')");
SqlCommand command = new SqlCommand(sqlquery, connection);
command.ExecuteNonQuery();
connection.Close();
CurrentSize = "-1";
fp.Dispose();
fp.CloseStreams();
}
For Aspx, better to use methods setUploadParam(name, value) and getUploadParams()
and then read them on server side using context.Request.QueryString[“paramName”]
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan