Window load not working as excpected ?
Im using two php post methods in window.load function, the first php post data is working perfectly, and second php page Profile.php is working alternatively i mean on first reload it is working, after reloading it again it isnt working. vice versa . . Not knowing where the problem is..!!
- $(window).on('load',function(){
- if(localStorage.getItem('verify')==1){
- if(localStorage.getItem('claim') == 0){
- if(localStorage.getItem('delete') == 0){
- $.post("/Web_Service/Load.php",function(data){
- $('.name>p').html(data.Name);
- $('.cover').css('background-image', 'url('+ data.Pic+')');
- $('#Name').val(data.OName);
- },'json');
- $.post( "Web_Service/Profile.php",function(data){
- //content for this php page
- },'json');
- }
- }
- }
- });