I have a page that loads other pages via Ajax (think frames except without frames).
Obviously, these pages can be called independently, so I want to determine if they are called via Ajax, and if not, redirect to the Ajax main page.
Pages are php pages, so I also have access to this.
index:
goto = "StandalonePrograms.php"; var clear = "<br style='clear:both;'>" if(goto != ''){ $.ajax({ url: goto, context: document.body, success: function(data){ $('#mainwindow').html(data + clear); $('#mainwindow').find("script").each(function(i){ eval($(this).text()); }); } }); }
jquery ajax php
AndyD273
source share