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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:56:40+00:00 2026-05-20T09:56:40+00:00

I have a page (parent) that when a button (with .click funciton) is clicked

  • 0

I have a page (parent) that when a button (with .click funciton) is clicked it uses jQuery .load to load a form into the div. On the parent page is the following PHP

<?php
   $SubmitDATETIME = date("n/j/Y g:i A");
   $timestamp = date ("n/Y");
?>

the “loaded” content uses a remote script to validate the form, but I cannot seem to pass the $SubmitDATETIME and $timestamp to the loaded form. I’ve tried just using input boxes like

<input type"text" value="<?php echo $SubmitDATETIME ?>"> but they are empty. When I put same code on parent page it works. Should I a) create this function with JS and apply to the button’s click funciton, or b)is there a way to pass the $SubmitDATETIME and $timestamp variables from the parent page to the loaded content? possibly make it a remote PHP function and use .get to echo the values? I’m stumped.

thx

***************** EDIT *****************

I might not have been as clear as I needed to be on this, when you click the “button” it invokes a click function $("#singleContent").load('pForm.php #formContent', function() {...}); inside the function is the validation for the form, which contains the submtiHandler. In the submitHandler is a function to build an xml string of all the values of the form. One of which was to “echo the submitDATETIME” php function. this is where i was having issues. When I included the function as a $_SESSION, i could get it to print to the loaded form, but the validation was not echoing it. I know that I could use JS to build the funciton in the validation, but I don’t know how. I was able to echo the submitDATETIME to a hidden input and get it’s value from that in the xml string. phew. Is there a better way? how would I build the datetime with JS?

  • 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-20T09:56:41+00:00Added an answer on May 20, 2026 at 9:56 am

    You probably need to put those variables to the $_SESSION array.

    on the parent page:

    <?php
       $SubmitDATETIME = date("n/j/Y g:i A");
       $timestamp = date ("n/Y");
       session_start();
       $_SESSION['timestamp'] = $timestamp;
       $_SESSION['submitDATETIME'] = $SubmitDATETIME;
    ?>
    

    in the ajax loaded form:

    <?php session_start(); ?>
    <input type"text" value="<?php echo $_SESSION['submitDATETIME']  ?>">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that uses $(id).show(highlight, {}, 2000); to highlight an element when
Here's the problem: 1.) We have page here... www.blah.com/mypage.html 2.) That page requests a
I have a page where there is a column and a content div, somewhat
I have a page that is generated which inserts an HTML comment near the
I have a page with a Google Maps mashup that has pushpins that are
I have a list of stories on a page and each has several jQuery
In my system I have a main page, that when clicking on any element
Im using jQuery/PHP/MySql to load twitter search results on the page but limited to
I have a page with two buttons, one Button opens a popup window with
I have a page using <ul> lists for navigation (Javascript changes the styling 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.