PDA

View Full Version : Send javascript variable to PHP iFrame using AJAX



Simora
06-30-2009, 12:41 AM
What is the correct Ajax code format to send javascript variables to a hidden PHP iFrame? I see code on how to post form data using Ajax, but how do you post variables? I need to be able to access the javascript variables using PHP on the iFrame.

My Javascript vars that I need posted are like

var dstdate = dstime + 1;
var finalTime = time / 10;

And they go to a iframe Webtime.php

Sample code welcome.

Thanks