Jump to content

Why Doesn't This Form Submit?


lastkarrde

Recommended Posts

Howdy folks.

 

I'm having some troubles with forms not submitting when they are included by an AJAX call.

 

I have a page, <em>/add_many/</em> which just displays an HTML form. If I navigate to that page the form works as expected. However If i try and display that page in a dijit.Dialog modal (loaded via AJAX), the form will not submit.

 

Below is my AJAX code

 

addDialog = new dijit.Dialog({title: 'Add Reddit User', style: 'width:500px', preventCache:true});
addDialog.attr('href', '/add_many/');
addDialog.show();

 

The form displays fine in the dijit.Dialog box, and I can enter information into it. However clicking the submit button does absolutely nothing.

Any ideas?

 

Thanks

Link to comment
Share on other sites

I'm not at all familiar with Dijit or Dojo, but the documentation suggests that you need to handle the form in a different way:

 

In order to run Dialog's execute-method the submit button has to be a dijit.form.Button, normal submit button doesn't trigger this function.

 

http://dojotoolkit.org/reference-guide/dijit/Dialog.html#forms-and-functionality-in-dialogs

Link to comment
Share on other sites

Do you have this online that we could look at? Or if you don't want it public could you PM me the URL? As I said I don't really have any experience working with Dojo, so random guesses one at a time to try and fix it could take a while.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.