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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:15:36+00:00 2026-05-22T18:15:36+00:00

I’m using php and jquery. I have a form in php, after filling in

  • 0

I’m using php and jquery. I have a form in php, after filling in the form, I wanna be able to click submit and send the data to a modal window pop up, where the form data is displayed. There will be an additional textbox to fill in, then after clicking another submit, this textbox + the form data will be submitted to a processing page on the parent window.

So basically, i dunno how to –

1) Pass form data from form to modal window – do i use json stringify and if so how?

2) How to submit from the modal window the previous form data + data in the textbox back to the original form

Thanks

  • 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-22T18:15:36+00:00Added an answer on May 22, 2026 at 6:15 pm

    2) How to submit from the modal window
    the previous form data + data in the
    textbox back to the original form

    After opening new window with window.open(), you can access “parent window” via window.opener. E.g., if you have <form id='foo'/> in parent window, you can access it as $(window.opener).find('#foo') from “modal” window.


    1) Pass form data from form to modal
    window – do i use json stringify and
    if so how?

    What about sending POST to the same window, validating data, reloading the page and if everything is successful in the first form, then showing modal window after reloading the page? Data could be stored in $_SESSION, that way you don’t have to worry about passing data between windows. Or, if you really want to pass data to the form of child window, you can do something like this (not tested):

    var modalWindow = window.open(
        URL, 
        '_blank', 
        'width=400, height=300, left=100, top=300'
    );
    modalWindow.load(function(){
        var form = $(this).find('#idOfFormInModalWindow');
        form.find('[name=someField1]').val('someValue1');
        form.find('[name=someField2]').val('someValue2');
        form.find('[name=someField3]').val('someValue3');
    });
    

    someValue1, someValue2, someValue3 would be values from $_POST, passed through json_encode().

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a jquery bug and I've been looking for hours now, I can't
I am reading a book about Javascript and jQuery and using one of the
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
I have some data like this: 1 2 3 4 5 9 2 6
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.