var fso = new ActiveXObject("Scripting.FileSystemObject"); var s = fso.OpenTextFile(dir + "modules.txt", 2, true, -2); s.WriteLine(tobewritten); s.Close(); fso = s = null; //alert (s); if (s = "null") alert("Records updated"); window.location.href = 'main.html';
IE
Firefox
Quote:JavaScript try { // test to see if XMLHttpRequest is defined XMLHttpRequest.DONE; } catch (e) { XMLHttpRequest = new Object(); // define also all the constants XMLHttpRequest.UNSENT = 0; XMLHttpRequest.OPENED = 1; XMLHttpRequest.HEADERS_RECEIVED = 2; XMLHttpRequest.LOADING = 3; XMLHttpRequest.DONE = 4; } /** Creates new instance of the XMLHttpRequest object */ XMLHttpRequest.newInstance = function() { var xmlHttp = null; // use the ActiveX control for IE5.x and IE6 try { xmlHttp = new ActiveXObject("MSXML2.XMLHTTP"); } catch (othermicrosoft){ try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (native) { // If IE7, Mozilla, Safari, etc: Use native object xmlHttp = new XMLHttpRequest(); } } return xmlHttp; };
try { // test to see if XMLHttpRequest is defined XMLHttpRequest.DONE; } catch (e) { XMLHttpRequest = new Object(); // define also all the constants XMLHttpRequest.UNSENT = 0; XMLHttpRequest.OPENED = 1; XMLHttpRequest.HEADERS_RECEIVED = 2; XMLHttpRequest.LOADING = 3; XMLHttpRequest.DONE = 4; } /** Creates new instance of the XMLHttpRequest object */ XMLHttpRequest.newInstance = function() { var xmlHttp = null; // use the ActiveX control for IE5.x and IE6 try { xmlHttp = new ActiveXObject("MSXML2.XMLHTTP"); } catch (othermicrosoft){ try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (native) { // If IE7, Mozilla, Safari, etc: Use native object xmlHttp = new XMLHttpRequest(); } } return xmlHttp; };
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)