To show you what I want to do, you just need to visit gmail. When you click on the inbox, the url is updated to this tab "tab = mm #" and the only part of the page being refreshed is the most part in which your emails are what google calls div.lm How is this possible? How much do they use cache or do they use javascript command which I don't know about?
What I want to do, I have a page with two different tabs.
<div id="navcontainer"> <ul id="navlist"> <li id="active"><a href="#" id="current">Products</a></li> <li><a id="prreq" onclick="show()" >Requests</a></li> </ul> </div> <div class="container"></div>
When users go, for example. cart.php they go to the first tab. When users click on the second tab, the js function is launched, which calls the cart.php file? Rq = r, and the results are displayed in the div container. (I know that at the moment I have a post)
function show(){ var prstr= ".container"; var data= { rq: "r" }; $.ajax({ type: 'POST', url: "cart.php", data: data, success: function(data1) { $(prstr).html(data1); } });
}
What I want is when a user refreshes a page that is still in cart.php? rq = r, and no need to click on the tab again. I would appreciate any help. if you need more information, please let me know Thank you in advance.
viper source share