918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Rev | Line | |
---|
[0efa5a5] | 1 | // ************************************************************************************************//
|
---|
| 2 | // Aplicación WEB: Realtab
|
---|
| 3 | // Descripción: Aplicación web para gestión de Tablaturas y acordes de guitarra
|
---|
| 4 | // Copyright 2009 José Manuel Alonso. Todos los derechos reservados.
|
---|
| 5 | // Fecha: Junio 2008
|
---|
| 6 | // Fichero: Clase para llamar páginas web usando metodología AJAX
|
---|
| 7 | // *************************************************************************************************//
|
---|
| 8 | var _url;
|
---|
| 9 | var _fun;
|
---|
| 10 | var oXMLHttpRequest;
|
---|
| 11 | //____________________________________________________________________________
|
---|
| 12 | //
|
---|
| 13 | // LLama a la página
|
---|
| 14 | //
|
---|
| 15 | // Parámetros:
|
---|
| 16 | //
|
---|
| 17 | // url // Url de la página a la que se llama
|
---|
| 18 | // fun // Función a la que se llama despues de descargarse la página
|
---|
| 19 | //____________________________________________________________________________
|
---|
| 20 | function CallPage(url,fun){
|
---|
| 21 | _url=url;
|
---|
| 22 | _fun=fun;
|
---|
| 23 | if (window.XMLHttpRequest) {
|
---|
| 24 | oXMLHttpRequest= new XMLHttpRequest();
|
---|
| 25 | oXMLHttpRequest.onreadystatechange = procesaoXMLHttpRequest;
|
---|
| 26 | oXMLHttpRequest.open("GET",_url, true);
|
---|
| 27 | oXMLHttpRequest.send(null);
|
---|
| 28 | } else if (window.ActiveXObject) {
|
---|
| 29 | isIE = true;
|
---|
| 30 | try {
|
---|
| 31 | oXMLHttpRequest= new ActiveXObject("Msxml2.XMLHTTP");
|
---|
| 32 | } catch (e) {
|
---|
| 33 | try {
|
---|
| 34 | oXMLHttpRequest= new ActiveXObject("Microsoft.XMLHTTP");
|
---|
| 35 | } catch (E) {
|
---|
| 36 | oXMLHttpRequest= false;
|
---|
| 37 | }
|
---|
| 38 | }
|
---|
| 39 | if (oXMLHttpRequest) {
|
---|
| 40 | oXMLHttpRequest.onreadystatechange =procesaoXMLHttpRequest;
|
---|
| 41 | oXMLHttpRequest.open("GET",_url, true);
|
---|
| 42 | oXMLHttpRequest.send();
|
---|
| 43 | }
|
---|
| 44 | }
|
---|
| 45 | }
|
---|
| 46 | //_____________________________________________________________________________________
|
---|
| 47 | function procesaoXMLHttpRequest(){
|
---|
| 48 | if (oXMLHttpRequest.readyState == 4) {
|
---|
| 49 | if (oXMLHttpRequest.status == 200) {
|
---|
| 50 | var fcbk=_fun+"(oXMLHttpRequest.responseText)";
|
---|
| 51 | eval(fcbk)
|
---|
| 52 | }
|
---|
| 53 | }
|
---|
| 54 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.