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 8112561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:32:44+00:00 2026-06-06T02:32:44+00:00

I am using a dialog box to display and submit a enquiry form on

  • 0

I am using a dialog box to display and submit a enquiry form on my page.I am having problem when I try to call it again and again.The first time everything works fine and the form s submitted successfully.But if I click the GO button(added html below).I get an error for this line document.
EDITED:

<div class="hidden" id="dialog">
    <form action="index.php" class="testForm" id="testForm">
        <div class="name" id="name">
            <div class="displayName" id="dispName">Name</div>
            <div class="textName" id="viewName"><input type="text" class="fname" id="fullName" /></div>
            <div class="hide" id="nameErr"></div>

        </div>
        <div class="address" id="addressDetails">
            <div class="displayAddress" id="dispAddress">Address</div>
            <div class="textAddress" id=""><input type="text" class="taddress" id="fullAddress" /></div>
            <div class="hide" id="addressErr"></div>

        </div>
        <div class="submitForm" ><input type="button" class="submitDetails" id="submitInfo" name="Submit" value="Submit" onClick="validateAndSubmitForm()"/>
        <a name="Close" onclick="$('#dialog').dialog('close');">Close</a>
        </div>

    </form>
    </div>

Javascript\jquery

function submitEnquiryForProperty()

{

document.forms.testForm.reset();

$("#dialog").dialog({
                modal:true,
                resizable:false,
                autoOpen:false,
                width:260,
        });
openDialog();   

}

  function openDialog(){
$("#dialog").dialog("open");    
  }

  function closeDialog(){
$("#dialog").dialog("close");   
 }

Callback function on form submit

$.ajax({
            type:'POST',
            url:"processForm.php",
            data:"name="+name+"&address="+address,
            dataType:"html",

            success:function(msg){
                if(msg=="success"){
                    $("#dialog", window.parent.document).html("<div class='pad5'><div class='flt' style='padding-left:3px; width:235px;'><div class='thanx_msg'>Thank you for submitting the details. <br /><div class='spacer5'>&nbsp;</div><span class='gre'>Our Sales team shall revert to your query soon.</span></div></div><div class='spacer5'>&nbsp;</div><div style='padding-left:3px;' class='text'><strong>You can also:</strong></div><div style='margin-left:20px; line-height:20px;'>&bull; Apply for a <a href='homeloan.php'>Home Loan</a><br />&bull; Visit <a href='http://www.proptiger.com'>proptiger.com</a> for more properties<br />&bull; See our <a href='http://www.proptiger.com/blog'>Blog</a> for latest updates</div></div><br/><div class='msg' style='color:red;'>Click to close the box</div>");

                    $(function(){
                                $('#dialog').click(function() {
                                    closeDialog();
                                });
                            });

                }
                else
                {
                    alert("Operation cannot be completed,please try again");        
                }
            }

But I am facing the same problem.Error at the .reset() line.

Thanks for your time.

  • 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-06T02:32:46+00:00Added an answer on June 6, 2026 at 2:32 am

    Updated answer

    If you want to have a reusable dialog, do it like this:

    1. Include the dialog element (almost assuredly a <div>) in your initial HTML. Use a CSS class so that it will not be immediately visible, for example:

      HTML:
      <div id="dialog" class="hidden">...</div>
      
      CSS:
      .hidden { display: none }
      
    2. Unconditionally call $("#dialog").dialog(options) from Javascript immediately after the page loads. Be sure to set autoOpen: false in the options.

    3. Whenever you want to display the dialog, use $("#dialog").dialog("open").

    4. Whenever you want to hide the dialog, use $("#dialog").dialog("close").

    5. Repeat steps 3 and 4 as much as you like.

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

Sidebar

Related Questions

I am using jquery ui dialog box to display a form.When i click on
How to prompt browser to display open/save dialog box using jquery?
Using the message-box fn, I can display a modal dialog. I know this is
I am using Jquery Dialog box for a cv registration form on my website
I'm using the jquery-ui dialog box . My problem is upon clicking the x
I want to display font dialog box in my web application(asp.net). Im using the
I have div(box) on my page and I'm using this script to display div
I have a problem with using jQuery Dialog and Ajax submit in JSF. I
About Gtk Dialog box Behavior... I am using GtkBuilder +Glade to display a top
I'm trying to work through a problem I'm having with jQuery's dialog box in

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.