Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8785765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:26:50+00:00 2026-06-13T21:26:50+00:00

I am using JQuery’s UI dialog to open a form. My attempt is to

  • 0

I am using JQuery’s UI dialog to open a form. My attempt is to submit and close the dialog. I am having trouble.

The parent window opens the dialog (which contains a partial view) from click and form is submitted, for the first time, data is saved in DB. But if I click to open the dialog again and submit, there are 2 data rows saved in DB with the same value.

My code is below:

$('#newFileDialog').dialog('destroy');$('#newFileDialog').remove();

Is there something wrong with this code?

Your help is appreciated.

UPDATE:

Partial view:

@using(Html.BeginForm("New", "File", new {}, FormMethod.Post, new { Id = "newFileForm" }  ))
{    
   @Html.ValidationSummary()    
   @Html.RenderHTML(
        new TabContainerViewModel(
                new TabViewModel { Name = "File", ViewName = "Common", Model = Model, Visible = true},
                new TabViewModel { Name = "Permission", ViewName = string.Empty, Visible = true}
            ) { Id = "createFileTabs", Visible = true })    
   @Html.SubmitButton("Send")
}
@{ Html.JQueryAjaxForm("newFileForm", "containerComponentContent", string.Empty, "$('#newFileDialog').dialog('destroy');$('#newFileDialog').remove();showMessagebox('New File added');"); }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:26:51+00:00Added an answer on June 13, 2026 at 9:26 pm

    I found a solution. The reason was because of live event. So, after submission, I call die event, as follow:

    $('#form').die('click')

    and it works!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using jQuery timepickr: http://archive.plugins.jquery.com/project/jquery-timepickr Having included these files: jquery-1.7.1.min.js jquery-ui-1.8.21.custom.min.js ui.timepickr.js And getting this
Using jQuery, how would you find elements which have a particular style (eg: float:
(using jquery) I have the following function $(function() { $('tr.parent') .css(cursor,pointer) .attr(title,Click to expand/collapse)
Using jQuery UI I have two radio buttons, Approve/Reject, which I would like to
Using jQuery the child elements of the #parent element are to be fetched with
Using Jquery, I've managed to make a dropdown login form triggered by clicking a
Using jquery alerts dialog plugin , how do I send a value in a
Using jQuery, what's the best way to find the next form element on the
Using Jquery TableSorter, I am creating a custom parser to sort elapsed time <td>
using jquery's .post i send do my php code an object that with var_dump

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.