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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:10:28+00:00 2026-05-25T11:10:28+00:00

I have a jQuery popup box made with a div . When the user

  • 0

I have a jQuery popup box made with a div. When the user clicks a button, this popup will open. This popup contains a form, populated dynamically based on a key sent via POST/GET with jQuery.

  1. How to I generate this form dynamically using these POST/GET variables?
  2. How do I include a form within this popup, without using an iframe?
  • 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-05-25T11:10:29+00:00Added an answer on May 25, 2026 at 11:10 am

    Well you can use the $.ajax() function of jQuery that upon a click event will send a request to a – sort of – a web-service script which will grab that variable and then respond with the HTML content of the dynamic form.

    Using the returned data along with $.html() function you can set the wrapper’s innerHTML with the returned HTML and you will have your form.

    Small example:

    jQuery Code

    $("#button").click(function() {
        formID = 'form1';
    
        $.ajax({
            url: "formGenerator.php",
            type: "POST",
            data: formID,
            success: function(data) {
                if (data.length > 0)
                    $("#popupWrap").html(data);
            }
         });
    });
    

    PHP Code

    <?php
        // PHP Code 
        if (isset($_POST['data']) && !empty($_POST['data']))
        {
            switch($_POST['data'])
                case 'form1':
                    echo '<form name="FormName" action="" method="POST"><input type="text" /><input type="submit" value="Submit" /></form>';
                break;
                case 'form2':
                    echo '<form name="FormName2" action="" method="POST"><input type="text" /><input type="submit" value="Submit" /></form>';
                break;
        }
    ?>
    

    Notice: this code hasn’t been tested, I wrote it from the top of my head, but it should get you going.

    http://api.jquery.com/jQuery.ajax/

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

Sidebar

Related Questions

I have this code to popup a JQuery dialog box: $( #dialogBox ).dialog({ height:
I have the following jQuery which I need adapting: $(document).ready(function(){ $(.rss-popup a).hover(function() { $(this).next(em).stop(true,
My goal is to have a jQuery datepicker pop up when the user clicks
Say I have jquery code like this: html += '<div class=index>' + item.index +
I have some jQuery code like this: // Called right away after someone clicks
I have a popup box that retrieves content data via AJAX and displays this
Anyone have a sample of doing a jQuery notification/popup/calendar in Intraweb ? A simple
The Scenario Using jQuery, I have a page that has a popup overlay containing
I have jQuery code which looks something like this on Button1 Click $('table.result_grid tbody
I have included Zend_Form_Element_Hash into a form multiplecheckbox form. I have jQuery set to

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.