0

I am using jquery ui dialog box to display a form.When i click on submit, I want the form to perform action in the same div which is used to display the dialog box. But after form submission the response just displays the returned page on the parent window and not within the dialog.

1
  • What do you have working so far. Can you post any of your code? Commented Jan 12, 2010 at 6:12

2 Answers 2

1

When your form posts, the entire page is refreshed, not just the containing div element. What you need to do is use ajax form submissions and have the server return only the updated div content. Start here. The success ajax handler would then replace the div content with the server's response.

Edit: If you cannot upgrade to ajax forms or modify the response to include only the DIV content, the immediate alternative would be to host the form content in an iframe within the div. This would cause the form post to update itself within the iframe and not affect the containing page / div element.

Sign up to request clarification or add additional context in comments.

Comments

1

Sounds like you want to use $.get() to do an ajax hit to load some new data or html that you can then fill into the dialog box.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.