javascript - Passing jQuery paramenter between pages -
I am trying to exceed the variable between php pages with jQuery.
My code: I am using it at fullcalendar.js API:
First page: EventMain.php
: Function (start , End) {$ .ajax ({url: '/ dev / Event /Event.php', type: 'post', data: {name: 'john'}}); Popup Center (URL, 'Event', 1000, 450)} Then pop open with a second page: Event.php. Name variable required var name = & lt;? Php echo $ _POST ['name']; ? & Gt ;; Warning (name); The alert is empty .. Why do not I think?
I know that I can send variables on the URL as a parameter and then GetUrlParameter to get the variable on Event.php:
function getUrlParameter (sParam ) {Var sPageURL = window.location.search.substring (1); Var sURLVariables = sPageURL.split ('& amp;'); (Var i = 0; i sURLVariables.length; i ++) {var sPameterName = sURLVariables [i] .split ('='); If (sParameterName [0] == Aspirum) {return SP ram name [1]; }}} but I do not want to send variables on the URL. Is there any other way to send variables?
You can not access the post variable in the second session.
The popup that you open is a new request on the page that does not have data.
There is no proper solution for what you are trying to achieve.
Comments
Post a Comment