php - Needing to Pass Post Data to new page after Redirect (using iFrames) -


i in of sticky situation because client insists on keeping iframe functionality , wants page, after submitting information, review , on said information before submitting, if it's not right, go , re-submit changes.

basically, before confused want use form's action , post method using button outside iframe....

i using codiqa's buttons outside iframe target inner frame's js functions, when call review function redirects page, however, new page not display information have seemingly passed along via ajax. can please tell me why isn't working? html , irrelevant because passing input ids , ajax data (eid collects , iterates through html input ids), strictly need special js function might missing. when codiqa button pressed, calling "reviewdata()" function in js:

js

//upload data //global variables var extractform = {     'cable_no' : "",     'section_no' : "",     'extract_ft' : "",     'cable_status' : "",     'conduit_status' : "",     'extract_date' : "",     'extraction_team' : "" }  function reviewdata() {   //read of data page (eid in extractform) {     extractform[eid] = document.getelementbyid(eid).value; }         review_extractform(); } function review_extractform() { $.ajax({     type: 'post',     url: './php/review.php',     data: extractform,     async: false,     datatype: 'text',     success: function() {     },     complete: function() {         window.location.assign("./extraction/php/review.php?");     } }); }; 

then ajax passes page redirect page

php

//assign passed parameters $cable_no = $_post['cable_no']; $section_no = $_post['section_no']; $extract_ft = $_post['extract_ft']; $cable_status = $_post['cable_status']; $conduit_status = $_post['conduit_status']; $extract_date = $_post['extract_date']; $extraction_team = $_post['extraction_team']; ?> <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title>sample title</title> </head>  <body> <table align="center" width="100%">     <tr>         <th>cable type</th>         <th>section number</th>         <th>extracted footage</th>         <th>cable status</th>         <th>conduit status</th>         <th>extract date</th>         <th>extraction team</th>     </tr>     <tr style="text-align:center;">         <td><?php echo $cable_no; ?></td>         <td><?php echo $section_no; ?></td>         <td><?php echo $extract_ft; ?></td>         <td><?php echo $cable_status; ?></td>         <td><?php echo $conduit_status; ?></td>         <td><?php echo $extract_date; ?></td>         <td><?php echo $extraction_team; ?></td>     </tr> </table> </body> </html> 

im not on ajax aspect, nor trying do.

on second code section creating new php variables $cable_no = $_post['cable_no']; should work assigning values, if post coming previous page form action.

i name each field of form same name , id (i've forgotten 1 uses) i.e:

name: <input type="text" name="name" id="name"> 

if need values saved different pages , refreshes might want use cookie or session(cookie) cookie stores information on users machine , session cookie uses token , stores data on server. (i think has default time of 90 minutes session cookie).

also might want post actual form page. might resolve problem. don't have necessary knowledge json bit or combining jquery(ajax) php.

added note: should start transitioning html5 using html5 doctype <!doctype html> (which simpler remember)


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -