Opened 13 years ago

Closed 12 years ago

#2446 closed enhancement (invalid)

Prevent closing widget after dojo.io.bind

Reported by: Marcel Owned by: bill
Priority: high Milestone:
Component: Widgets Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:

Description

Is it possible to prevent the widget to close after an dojo.io.bind?

This code is in my ModalFloatingPane?. It submits correctly but it closes my Pane. See it here:

<script>
sendform = function() {
		dojo.io.bind({
                url: "addentry.php",
		formNode: dojo.byId("addentryform"),
		method: "POST",
		load: function(type, data, evt){ 
			dojo.byId('addentryform').innerHTML = data; 
		},
		error: function(type, error){ alert("error"); },   
		mimetype: "text/plain"         
	}); 
}
</script>

<div dojoType="ModalFloatingPane" widgetId="options">

<form id="addentryform">
<input type="text" name="field">
<input type="submit" value="Add" onclick="sendform()" />
</form>

</div>

Change History (3)

comment:1 Changed 13 years ago by guest

Ok. I have solved the problem. I am now using the dojo.id.FormBind? function. (described here: http://blog.dojotoolkit.org/2006/01/19/degradable-ajax-forms-with-dojo)

But my post.php don't writes any values??? <?php print_r($_POST); ?>

Whats wrong now?

comment:2 Changed 13 years ago by Marcel

My values are only shown in FF not in IE..... ???

comment:3 Changed 12 years ago by bill

Resolution: invalid
Status: newclosed

Probably the original problem was because you didn't cancel the event from the submit button, so it actually refreshed the whole page. Anyway, not sure why you had a problem w/FormBind on IE but in any case, in 0.9 formBind is gone (although you can do a formToObj() call and pipe it into a xhrPost().

Note: See TracTickets for help on using tickets.