Answer the question
In order to leave comments, you need to log in
Jquery. IE does not see the value from $_SESSION. How to win?
Does not work in IE 9, 10, 11. Works in
FF and Chrome.
On the main page I set $_SESSION["step"] = 1
On the button I send $.post
After $.post the page is reloaded.
$.post('/', {catalog: 'setstep'}, function(e){
window.location = e;
});
{if $smarty.session.step == 1}
<div id="1">1</div>
{else}
<div id="2">2</div>
<div id=1>
, and the value of $_SESSION["step"] == 2 (displayed via echo). <div id="2">
$.ajaxSetup({
cache: false,
dataType: 'text',
contentType: "application/x-www-form-urlencoded; charset=utf-8"
});
Answer the question
In order to leave comments, you need to log in
If a reboot is made after the post, then what is the scary sense of making it a javascript?
Do it humanly, HTTP post - HTTP redirect - and everything will work for you.
Apparently in order for the clock to spin on the screen until the result is returned. PHP has a lot going on at this time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question