Opened 15 years ago

Closed 14 years ago

#2645 closed defect (wontfix)

Send file via

Reported by: Marcel Owned by: alex
Priority: high Milestone:
Component: IO Version: 0.4.2
Keywords: upload,, form Cc:
Blocked By: Blocking:


Hi Dojo-Team. How can I display the result of the in the same div?

This is my function:

function uploadBind(formid, targetdiv) {{
    formNode: dojo.byId(formid),
    mimetype: "text/plain",
    content: {
	increment: ctr++,
	fileField: datei },
    handler: function(type, data, e) {
	dojo.byId(targetDiv).innerHTML = data; // Here I want to display the result..
    error: function(type, error){ alert("Type: "+type+ "
Error: "+error); }

This is my upload form:

<div id="upload">
  <form id="uploadform" action="./functions/uploadfile.php" method="POST" enctype="multipart/form-data">
  <input type="file" name="datei"  /><br />
  <input type="submit" name="submit" value="Hochladen" onclick="uploadBind('uploadform','upload')">

The upload works well, but it displays the result of the uploadfile.php in a new window, instead of displaying it in my <div id="upload"....

Change History (2)

comment:1 Changed 15 years ago by [email protected]

there are just some errors in your code:

  • "submit" is a very bad choice for a fieldname
  • ctr seems not to be defined
  • dojo.byId(targetDiv).innerHTML should be dojo.byId(targetdiv).innerHTML
  • fileField: datei should be fileField: "datei"


comment:2 Changed 14 years ago by James Burke

Resolution: wontfix
Status: newclosed

Looks like this was solved by Thomas' comment.

Note: See TracTickets for help on using tickets.