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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:57:15+00:00 2026-05-27T05:57:15+00:00

I currently have a webpage where an iframe contains data that is stored into

  • 0

I currently have a webpage where an iframe contains data that is stored into an invisible form, and I want to replace that iFrame, with a div, where the content is being changed/updated via AJAX.

If you dont feel like reading all this, you can skip to the end and read my main question.

Now, the complicated part is that the form contains all the important and used data in an invisible form, which needs to be send via POST. But, the page also includes a form that can send data via GET. And: I’ve setup the forms like this, that the php file recieves the form data as an array.

At the moment it works like this:
The iFrame shows the data, and stores it in an invisible form. When you want the page to refresh automatically, every 30 seconds, you click a button, and you get redirected to another page, which recieves the data from the previous page, using POST.
When you’re on the auto-refreshing page, I use Javascript to automatically submit the form containing all the important data, to refresh the page.

Resubmitting the page is nessecary because I use PHP to do some important calculations with the data I’m using. Moving all this functionality to Javascript is not an option.

Just to be clear, here is a very brief description of my case:

Main page: 2 forms, 1 POST setup so variables are in 1 array, 1 GET with 6 variables.
The GET form could be modified to an AJAX function, as it only includes 6 variables

Auto update page: 2 forms, same as before. Though this POST form is auto-submitted via Javascript every 30 seconds (to update the PHP
functions output).

So, my main question is:
Can I, and if so how, recieve an array from a POST form in AJAX, and then send it as an array to a php page?

EDIT:
Here is some of the code for submitting the form:

<script type="text/javascript">
function paginarefresh() {
    document.forms["updateform"].submit();
}
var paginatimer = setInterval(paginarefresh, 60000);
</script>

and the form is build up like this:

echo '<form action="data-reis-refresh.php" id="updateform" name="update" method="POST" style="width: 100px;">';
echo '<input type="submit" class="submit replaced" value="Volg deze trein" name="submit-search"/>';
if (round($afgelegdpercentage*100,1)==100) {
echo ' <a href="#" class="submit button"><span style="text-align: center;">Deze trein is al aangekomen</span></a>';
    } else {
echo ' <a href="javascript:submitform(\'update\')" class="submit button"><span style="text-align: center;">Ververs gegevens (automatisch elke minuut)</span></a>';
}
echo '<input type="hidden" name="provincie" value="'.$provincie.'">
      <input type="hidden" name="reisdata[Overstap]" value="'.$reisdata["Overstap"].'">
      <input type="hidden" name="reisdata[Van]" value="'.$reisdata["Van"].'">

but then longer (a lot longer, and with changing length);

I’m using this for all my AJAX requests: [though I change it for different uses]

// Algemene functie om een xmlHttp object te maken. Via dit object kunnen we later Ajax calls plaatsen

function GetXmlHttpObjectReisData() {
    var xmlHttp;
    try { // Firefox, Opera 8.0+, Safari
        xmlHttp = new XMLHttpRequest();
    } 
    catch (e) { // Internet Explorer
        try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
        } 
        catch (e) {
            try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
            } 
            catch (e) {
                alert("Your browser does not support AJAX!");
                return false;
            }
        }
    }
    return xmlHttp;
}
function CallAjaxReisDataFunction(serverScript,arguments)
{
    var xmlHttp = new GetXmlHttpObjectReisData(); // Functie welke wordt uitgevoerd als de call naar de server klaar is State 4)
    xmlHttp.onreadystatechange = function()
    {
        if (xmlHttp.readyState == 4) 
        {
            handleReisDataResult(xmlHttp.responseText);
        }
    }

    // Ajax call (Request naar de server met eventuele parameters (arguments))
    xmlHttp.open("POST", serverScript, true);
    xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlHttp.setRequestHeader("Content-length", arguments.length);
    xmlHttp.setRequestHeader("Connection", "close");
    xmlHttp.send(arguments);
}

function callReisDataServer(serverScript,van,naar)
{
    CallAjaxReisDataFunction(serverScript,"?&reisdata=" + reisdata);
}

function handleReisDataResult(responseText)
{
    document.getElementById('reis').innerHTML = responseText;
}
  • 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-27T05:57:16+00:00Added an answer on May 27, 2026 at 5:57 am

    In the end, I ended up using jQuery .post() and .get().
    Those are extremely easy to use and a lot faster and more flexible.

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

Sidebar

Related Questions

I currently have a php webpage. However, I want to break it down into
Suppose you have a webpage that is displaying data in columns. I'm currently separating
I currently have Google Maps integrated into my webpage. It is being used to
I am currently updating a webpage that has some very simple data displayed in
I currently have a program that basically reads html from a webpage. After sending
I currently have a div layer that includes some javascript (to display a button).
I currently have a login form that clears text from the field after a
I have written a webpage with GWT which contains auto-generated Hyperlinks. These hyperlinks currently
Let's say I have a web page that currently accepts a single ID value
I have an application that launches a webpage in the current browser when the

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.