View Single Post
  #12 (permalink)  
Old 10-28-2007, 09:45 AM
ordex ordex is offline
Starter Member
 
Posts: 2
Exclamation

I have a dialog contenent a div

Code:
div.innerHTML =
		[ "<table><tbody>",
		  "<tr>",
		    "<td align='center'><label for='", toId, "'>Num: <input autocomplete='on' style='width: 21em' type='text' id='", toId, "' value='", toValue, "'/>",
		    "</td>",
		  "</tr>",
		  "<tr>",
		"<td colspan='2' align='center'>",
		"<textarea rows='10' cols='100' style='width: 25em' name='testo' id='", bodyId, "'>", bodyValue, "</textarea>",
                "<br>",
		"<form name='uploadForm' id='uploadForm' method='post' enctype='multipart/form-data' action='/service/upload?fmt=raw'>",
			"<input type='file' name='attach' />",
			"<input type='hidden' name='requestId' value='firstAttach' />",
		"</form>",
		"</td>",
		"</tr>",
		"<tr></tr>",
		"</tbody></table>" ].join("");
        el.appendChild(div);

	var dialog_args = {
		title : "Zimlet",
		view  : view
	};
	var dlg = this._createDialog(dialog_args);
	dlg.popup();
On click on the OK button a function is called:
Code:
        var form = document.getElementById("uploadForm");
	var iframe = document.createElement("iframe");
	var view = new DwtComposite(this.getShell());
	view.getHtmlElement().appendChild(iframe);
		
	var post = new AjxPost(iframe);
	var callback = new AjxCallback(this, this._resultCallbackAlert);
	post.execute(callback, form);
But callback is not called and a new window is opened with the result ouput in it.

I also tried in this way, but it doesn't work
Code:
document.body.appendChild(el);
Thank's again

Last edited by ordex; 10-28-2007 at 09:58 AM..
Reply With Quote