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

  • Home
  • SEARCH
  • 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 8215561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:49:56+00:00 2026-06-07T11:49:56+00:00

Ok, I searched, but didn’t come up with my exact issue… I load a

  • 0

Ok, I searched, but didn’t come up with my exact issue…

I load a jqModal with a hidden div that contains a contact form which posts to process page via $.ajax
All works fine. The response message displays in the modal box and user can then exit out of modal.

The issue is when the modal get’s re-triggered (without a parent page refresh), it displays the response text from the previous usage of the modal. I’d like to reload the hidden div on the parent page with the blank form.

$('.submitModal').click(function(e){
   e.preventDefault();
   $('form').hide(); 
   var pStartTime = $('#eventStartTime').val();
   var eventDataString = 'startTime='+pStartTime;
   $.ajax({
      type:"POST",
      url:"i_calendarAddEvent.php",
      data:eventDataString,
      success: function(responseText){
         $('.addEventTitle').html('Success. Event Added.');
         $('.showResponse').html(responseText);
      }
   });
});

I’ve tried adding a call to reset the form elements (in the $.ajax success function), but not sure if it works because the form in the hidden div never shows again.

function resetForm(formid) {
    $('#' + formid + ' :input').each(function(){ 
        $(this).val('').attr('checked',false).attr('selected',false);
    });
}

Thanks for any insights.

  • 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-07T11:49:57+00:00Added an answer on June 7, 2026 at 11:49 am

    Hopefully you have found and answer by now 🙂 I recently ran in to a similar problem with an ajax post. Basically what was happening is that the ajax request was being cached. My solution was to add

    $.ajaxSetup({ cache: false });

    to my script file. Let me know if it works for your situation.

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

Sidebar

Related Questions

I searched for this but didn't find an solution that totally fixed my problem.
I searched everywhere but didn't find the solution. I have image 1. How can
i searched for hours for a way to solve my problem but didn't get
I searched around a little bit for information on this but didn't find anything
I have searched a lot about the difference between Website and WebApplication but didn't
I have searched a bit on google, but didn't really found an answer to
I searched the registry. I'd expect the settings in HKEY_CURRENT_USER\Software\CodeGear\BDS\7.0 but didn't find anything.
I searched pretty much everywhere on google, but I didn't find anything useable. I
I've searched the site but still didn't found any answers to my question. Could
I have searched on SO for similar questions but didn't find any.So forgive me

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.