Upload file with this.send

As a newbie, I suspect I’m just doing something wrong. I’d like to emulate a standard HTML form with a tag like

Putting { type: “file”, name: “file1”, label: “File to Upload” },
works fine in the brower, but the submit this.send(“Upload”,“post”,“file1”); or just
this.send(“Upload”) work fine for all of the other controls (check boxes etc) but the file doesn’t come along. I’m running Fiddler to watch things, no errors finding and dhtmlx components, no errors at all on the browser side, just no data from the file.

The documentation refers to using standard submit, which sounds right, but I’m clearly missing something!

Thanks!

Bob

Hello

Correct, with uploader control in a form you need to use default browser form.

Like this:

[code]

[/code]

// init form var myForm = new dhtmlXForm("myDHXForm",..); // submit document.getElementById("myHTMLForm").submit();

You can add button into your form (real or dhtmlx) and use it,
in dhtmlx-form button case, you can use:

myForm.attachEvent("onButtonClick", function(){ ... document.getElementById("myHTMLForm").submit(); })

If you’re interested in uploading files using form - please contact us support (at) dhtmlx dot com
Please include link to this thread in your message

Hi,

Can html form submitted with jquery? as when using the above example it closes the popup window and redirects the main page to action page of the form. Please I need the following functionality while using the dhtmlx form.

Thanks
Mahmooda

html form can be submitted using form.sumbit()
all things which allow to do it - can do it.
form also have “target” attribute, to prevent current window from closing - use it.

also we can send you test version of our new uploader,
if you’re interested in it - please send us mail to support at dhtmlx.com
including link to this forum posts

Hello…

I experienced the same thing
there is a more detailed example

Thk’s