Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- request.open('GET',url+page+".html");
- function cargar(selector,page) {
- limpiarModal();
- if(page=="agb" || page=="impressum") {
- $(selector).html("Loading...");
- $.ajax( {
- url: url+page+".html",
- type: "GET"
- })
- .done(function( html ) {
- $(selector).html(html);
- })
- .fail(function() {
- alert( "error" );
- });
- /*
- var request = null;
- var cont = $(selector);
- //fix for IE8 and IE9
- if(window.XMLHttpRequest || window.ActiveXObject) {
- if(window.XMLHttpRequest)
- request = new XMLHttpRequest();
- else
- request = new ActiveXObject("Microsoft.XMLHTTP");
- request.onreadystatechange = function() {
- if(request.readyState == 4) {
- cont.html(request.response);
- } else {
- cont.html("Loading...");
- }
- }
- request.open('GET',url+page+".html",true);
- request.send(null);
- } else if(window.XDomainRequest) {
- request = new XDomainRequest();
- request.onload = function() {
- cont.html(request.responseText);
- }
- request.open('GET',url+page+".html");
- request.send(null);
- }
- }
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment