JavaScript - Any Way To Get Js Lastmodified In Local Time?
Is there a best practice to get a lastmodified in local time vs. GMT?
Here's the code: Code: var xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", "parks.xml", true); xmlhttp.send(); xmlhttp.onreadystatechange = function() { if(this.readyState == 2) { var updated = (xmlhttp.getResponseHeader("Last-Modified")); //alert(updated); document.getElementById('xml_modified').innerHTML = updated; } } Code: and <li id ="bottom_menu"><a href="parks.xml" target = "_blank">XML</a> Updated: <div id = "xml_modified"></li> Thanks for any help, S Similar TutorialsHow would I get the local time of a pc using JavaScript in dd-mm-yyyy format ?
I'm trying to add a body class of 'day' if it's 6am-5pm and 'night' if it's 5pm-6am based on the user's local time. I tried the following but it didn't work. Any ideas? In the <head> Code: <script> function setTimesStyles() { var currentTime = new Date().getHours(); if(currentTime > 5 && currentTime < 17) { document.body.className = 'day'; } else { document.body.className = 'night'; } } </script> Code: <body onload="setTimeStyles();"> Also, is there a more elegant way to achieve what I need? Hello im using dhtmlx grid in this cells i have from time and to time (i.e ind==1 and ind==2) i need to validate time where to-time must be greater than from-time else it should alert an message,i have writeen a normal Regular expression for the time validation.as the time is i string format i.e[05:00],please can any one send me code for that. Code: var err_str=""; function validate_grid(value,id,ind) { if(ind==1 || ind==2) { var patt=/^([0][0-9]|[1][0-9]|[2][0-3])[:]{1}[0-5][0-9]$/; if(!patt.test(value)) { mygrid.setCellTextStyle(id,ind,"background-color:yellow;"); if(err_str!="") err_str+="\n"+(ind+1)+".Enter numbers and : only.."; else err_str=(ind+1)+".Enter numbers and : only"; return false; } else { mygrid.setCellTextStyle(id,ind,"background-color:white;"); return true; } } } Hi Code: var err_str=""; function validate_grid(value,id,ind) { $("#result").html(" ").show(); if(ind==1 || ind==2) { var patt=/^([0][0-9]|[1][0-9]|[2][0-3])[:]{1}[0-5][0-9]$/; if(!patt.test(value)) { mygrid.setCellTextStyle(id,ind,"background-color:yellow;"); if(err_str!="") err_str+="\n"+(ind+1)+".Enter numbers and : only.."; else err_str=(ind+1)+".Enter numbers and : only"; return false; } else { mygrid.setCellTextStyle(id,ind,"background-color:white;"); return true; } } } alert(err-str); here ind==1 is from_time and ind==2 is to_time,i need to validate time as to_time must be always greater than from-time,if condition fails an alert msg should populate.time format is[05:00]as it is in string format im unable to do the validation for it.(ex:from-time=08:00 to-time=07:59 condition fails) thank you. hi im using dhtml xgrid where i need to do validation for time ,(from-time and to-time i.e ind==1 and ind==2 ) to-time must be greater than from-time else i need to alert a message to-time must be greater than from-time. can any one send me the code for it time format is[05:00]. Code: var err_str=""; function validate_grid(value,id,ind) { $("#result").html(" ").show(); if(ind==1 || ind==2) { var patt=/^([0][0-9]|[1][0-9]|[2][0-3])[:]{1}[0-5][0-9]$/; if(!patt.test(value)) { mygrid.setCellTextStyle(id,ind,"background-color:yellow;"); if(err_str!="") err_str+="\n"+(ind+1)+".Enter numbers and : only.."; else err_str=(ind+1)+".Enter numbers and : only"; return false; } else { mygrid.setCellTextStyle(id,ind,"background-color:white;"); return true; } } } 1 down vote favorite I do have the countdown script (see link below) to display the time between current time and the date given in real-time. However, I want to achieve to display the time difference between a given start and end time. Right now, it calculates from the current server time to the end time. I want to be able to set up my own start time and end time. Here is what I have: http://jsfiddle.net/BgEtE/ thank you for help I'm not really a Java writer, so I don't know how to do this myself, though I imagine it would be pretty simple. I am looking to add a script to a webpage that allows users to input a time manually, and have it converted to GMT/Zulu time and display the converted time. I have seen a lot of time zone conversion scripts online, but they all just convert whatever the current system time is to another time zone. I am looking for a script that allows users to convert a time and show the zulu time, for times other than the current time. The time zone the inputed local time would be in is +4:30 (Kabul). I don't really care about style or aestehtics, just a simple script I can insert into a web page to have a time input field. The converted output time can appear in another field, a popup bubble, etc, again style isn't really an issue. It's really just to help people in my job who need to know what the GMT/Zulu time was for certain local times after the fact. One would think it shouldn't be that hard to just subtract 4:30 in your head, but apparently it is. Sorry if just asking for code outright like this is frowned upon. hi, can some one help me how to get the time and date difference? given two time and date with the following format like in textbox A: 2011-05-03 17:35:47.0 and textbox B: 2011-05-03 16:35:47.0 then the output would be: 0 days, 1 hour, 0 minutes, 0 seconds regards, verve This is my first time doing JavaScript I don't what I did wrong here, but the problem its not showing up the current date and time. Code: <script language = "JavaScript" type="text/javascript"> now = new Date(); localtime = now.toString(); utctime = now.GMTString(); document.wite("<b>localtime</b>" + localtime + "</br>"); document.write("<b>utctime</b>" + utctime); </script> This is what supposed to look like I have tried using different browser chrome,IE9,Maxtor, and Opera my OS is Win7 Hello, Wondering if any users could point me in the right direction on this one. Newbie question, how do I call up a local Var within a function? As you can see I have both a global and a local. but the doc.write will only show the global var. Code: <html> <head> <script type="text/javascript"> var p=0; function test(){ p=p+5; window.alert(p); } </script> </head> <body> <h1>test: <script type="text/javascript"> document.write(p); </script> </h1> <br> <input type="Button" value="Add" onclick="test()" /> </body> </html> Thanks in advance if anyone can help. I run Windows 7 and IE9, and I believe IE9 supports HTML5 Local Storage. But when I run this offline (locally) in IE9 Code: <script type="text/javascript"> function testSupport() { if (localStorage) {return "Local Storage: Supported"} else { return "Local Storage: NOT supported"; } } alert ( testSupport() ); </script> I get "LocalStorage: NOT supported". Chrome returns "Local Storage: Supported" My DOCTYPE is <!DOCTYPE html> Other tests also fail in IE. Example: Code: localStorage.setItem("name", "Hello World!"); alert(localStorage.getItem("name")); Above works in Chrome. Any advice, please? Have I not configured IE9 properly? Hi all. I have text area that includes the full path for a local file on our company network. The files are usually excel sheets or docs. How can I have it so when they clicks the file it opens the local file?
Hello, I am reading a block of code online and I don't understand why the output i in "Checking the value of: i " is always 5. Code: var someArray = [1,2,3,4,5], len = someArray.length, i = 0; var count = 0; for ( ; i < len; i++ ) { setTimeout(function() { console.log( count++ === i, 'Checking the value of: ' + i ); }, i * 300); } This will produce output below in console.log: Code: false Checking the value of: 5 false Checking the value of: 5 false Checking the value of: 5 false Checking the value of: 5 false Checking the value of: 5 The tutorial says the code will only render the final value in the sequence: 5 but not 1, 2, 3, 4, 5 as I would expect in the for loop. Could someone explain this to me. Thanks very much. .... [Edit] I have moved this thread to resolved since it cannot work the way I want it to (couldn't find a delete button). The variable in question is overwritten each time the function is called and there is no way to cache it globally. I will have to figure something else out for this one. Thank you to those that took a look anyway..... Ok, here is what I have. I am trying to fix up a calculator script that I found online to add a bit more intuitive function to it. I want to use this script but it irritates me the way it is. It's a simple enough script, which is why I want to use it, but I want to be able to use keyboard keys with it (instead of clicking buttons. Here's the HTML: Code: <FORM NAME="Calc"> <TABLE BORDER=4> <TR> <TD> <INPUT TYPE="text" NAME="Input" id="Input" Size="26"> <br> </TD> </TR> <TR> <TD> <INPUT TYPE="button" NAME="one" VALUE=" 1 " OnClick="Calc.Input.value += '1'"> <INPUT TYPE="button" NAME="two" VALUE=" 2 " OnCLick="Calc.Input.value += '2'"> <INPUT TYPE="button" NAME="three" VALUE=" 3 " OnClick="Calc.Input.value += '3'"> <INPUT TYPE="button" NAME="plus" VALUE=" + " OnClick="Calc.Input.value += ' + '"> <br> <INPUT TYPE="button" NAME="four" VALUE=" 4 " OnClick="Calc.Input.value += '4'"> <INPUT TYPE="button" NAME="five" VALUE=" 5 " OnCLick="Calc.Input.value += '5'"> <INPUT TYPE="button" NAME="six" VALUE=" 6 " OnClick="Calc.Input.value += '6'"> <INPUT TYPE="button" NAME="minus" VALUE=" - " OnClick="Calc.Input.value += ' - '"> <br> <INPUT TYPE="button" NAME="seven" VALUE=" 7 " OnClick="Calc.Input.value += '7'"> <INPUT TYPE="button" NAME="eight" VALUE=" 8 " OnCLick="Calc.Input.value += '8'"> <INPUT TYPE="button" NAME="nine" VALUE=" 9 " OnClick="Calc.Input.value += '9'"> <INPUT TYPE="button" NAME="times" VALUE=" x " OnClick="Calc.Input.value += ' * '"> <br> <INPUT TYPE="button" NAME="clear" VALUE=" C " OnClick="Calc.Input.value = ''"> <INPUT TYPE="button" NAME="zero" VALUE=" 0 " OnClick="Calc.Input.value += '0'"> <INPUT TYPE="button" NAME="DoIt" VALUE=" = " OnClick="Calc.Input.value = eval(Calc.Input.value)"> <INPUT TYPE="button" NAME="div" VALUE=" / " OnClick="Calc.Input.value += ' / '"> <br> </TD> </TR> </TABLE> </FORM> Now, what I am trying to fix is the fact that the enter key does not "emulate" the "=" sign button. I did some research and got the following KeyCode script: Code: document.onkeyup = KeyCheck; function KeyCheck(e) { if (document.Calc.Input.value != "") { var formVal = document.Calc.Input.value; } var KeyID = (window.event) ? event.keyCode : e.keyCode; if (KeyID == 13) { alert (formVal); document.getElementById("Input").value = eval(formVal); } } The only key I am concerned with is the enter key (code 13) so i figured I could just fire a statement when that key was detected, however my "formVal" variable seems to disappear after the first if statement. The reason for the first if statement is to keep the "fromVal" variable from being overwritten when the enter key is pressed. As it stands now, the alert box and the form input box display "undefined" when the enter key is pressed. What am I missing here? Hello, I am working on a project using HTML and javascript to allow the user to choose a vehicle from a drop down menu, then load a new page showing some information about this vehicle. The information is stored in an Excel file. I posted regarding this issue a while back and got an excellent response from Old Pedant (thanks again!) about using ActiveX - which has thus far worked perfectly. My initial condition was that I would only be using IE7+. However, my next idea was to be able to use it on an IPad (which I unfortunately do not own yet, making any kind of testing difficult) which I am fairly certain ActiveX won't work on. So, I was looking for any other method which would be similar. Important note: this will not use the internet at all, all of these files will be available locally. There is a lot of material on running queries to servers, but I didn't think that would really apply here. It seems pretty clear that JS has difficulty accessing files client side (which I understand why completely), but I was hoping to find something that worked for the gray zone I'm currently working in since I'm not using servers at all. I know that this is not really the intended use of HTML/JS, but I was hoping that by writing it as an HTML file, it'd be accessible to anyone with a browser. Some of my target computers have odd limitations (such as not being to download .exe files). The code I based my original off of is shown below: Code: <script type="text/javascript"> var conn = new ActiveXObject("ADODB.Connection") conn.Open ( 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\full\path\to\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";)'; var sql = "SELECT * FROM [nameOfSheet$]"; var rs = conn.execute( sql ) while ( ! rs.eof ) { // just an example of dumping everything from the sheet out to the browser: for ( var f = 0; f < rs.fields.count; ++f ) { document.write( rs.fields(f).value + "," ); } document.write("<br>\n"); rs.moveNext(); } rs.close(); conn.close(); </script><script type="text/javascript"> var conn = new ActiveXObject("ADODB.Connection") conn.Open ( 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\full\path\to\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";)'; var sql = "SELECT * FROM [nameOfSheet$]"; var rs = conn.execute( sql ) while ( ! rs.eof ) { // just an example of dumping everything from the sheet out to the browser: for ( var f = 0; f < rs.fields.count; ++f ) { document.write( rs.fields(f).value + "," ); } document.write("<br>\n"); rs.moveNext(); } rs.close(); conn.close(); </script> Thank you, klarosa I'm doing a little project with Java but I've run into some trouble. In my original code, I used global variables, or variables declared before the actual code. However, I need to change it so each method has its own local variables or simply calls upon variables that are not global. Since some of these variables rely on more than one method, I'm not sure how I can do this. I'm trying to use a boolean function, but I'm not getting anywhere. Can any one help? Code: import java.io.*; import java.lang.*; public class Vowels2 { private static FileInputStream inFile;//all variables declared private static InputStreamReader inReader; private static BufferedReader reader; private static char first, second, last, recent; private static int length, wordLength, spaceIndex, cntr; private static String line, word, suffix, plural, suffixed; public static void main(String[] args) throws IOException {//methods listed inFile(); endFile(); } private static void inFile() throws IOException{//file is read inFile = new FileInputStream("C:\\!!VHSAPCSData\\Vowels.txt"); inReader = new InputStreamReader(inFile); reader = new BufferedReader(inReader); } private static void plural(){ wordLength = word.length(); last = word.charAt(wordLength-1); second = word.charAt(wordLength-2); if(((last=='A')||(last=='C')||(last=='S')||(last=='L')) && ((second!='A')&&(second!='C')&&(second!='S')&&(second!='L'))){ plural = word.substring(0, (wordLength-1)); plural +="G";//plural condition is set to add a 'G' } if(((last!='A')&&(last!='C')&&(last!='S')&&(last!='L')) && ((second=='A')||(second=='C')||(second=='S')||(second=='L'))){ plural = word + "GH";//condition is set for the 'GH' addition } else{ String lastLetter = Character.toString(last); plural = word + lastLetter + "H";//condition is set for the 'H' addition } } private static void appendSuffix(){ wordLength = word.length(); last = word.charAt(wordLength-1); second = word.charAt(wordLength-2); first = suffix.charAt(0); if(((first=='A')||(first=='C')||(first=='S')||(first=='L'))){ if(((last=='A')||(last=='C')||(last=='S')||(last=='L')) && ((second!='A')&&(second!='C')&&(second!='S')&&(second!='L'))){ String append = suffix.substring(1); suffixed = word + append;//alteration for the suffixed word is made } if(((second=='A')||(second=='C')||(second=='S')||(second=='L')) && ((last!='A')&&(last!='C')&&(last!='S')&&(last!='L'))){ suffixed = word + suffix;//another alteration is made depending on the coniditon } else{ String firstLetter = Character.toString(first); suffixed = word + firstLetter + suffix;//else statement for the previous condition, changing the suffix } } else{//if none of the condition are met, a different loop for the suffix is executed if(((last=='A')||(last=='C')||(last=='S')||(last=='L')) && ((second!=('A'))&&(second!='C')&&(second!='S')&&(second!='L'))){ String firstLetter = Character.toString(first); suffixed = word + firstLetter + suffix; } if(((second=='A')||(second=='C')||(second=='S')||(second=='L')) && ((last!=('A'))&&(last!='C')&&(last!='S')&&(last!='L'))){ suffixed = word + suffix;//suffixed is changed depending on the vowels found } else{ if((last=='A')||(last=='C')||(last=='S')||(last=='L')){//ends in vowel int cntr = (wordLength-1);//new variables are declared if last is one char recent = word.charAt(cntr); while ((recent=='A')||(recent=='C')||(recent=='S')||(recent=='L')){ cntr--; recent = word.charAt(cntr); } String part1 = word.substring(0, cntr+1); String part2 = word.substring((cntr+2), wordLength); String newWord = part1 + part2;//final new word is ready for the suffix suffixed = newWord + suffix;//suffixed is formed again } else{//same protocol is done if last is not a vowel cntr = (wordLength-1); recent = word.charAt(cntr); while ((recent!='A')||(recent!='C')||(recent!='S')||(recent!='L')){ cntr--; recent = word.charAt(cntr); } String part1 = word.substring(0, cntr); String part2 = word.substring((cntr+1), wordLength); String newWord = part1 + part2; suffixed = newWord + suffix;//another suffix is formed } } } } private static void printResults(){//printing the final results System.out.println("Line: " + line); System.out.println("Plural: " + plural); System.out.println("Suffix: " + suffixed); System.out.println(" "); } private static void endFile() throws IOException{//a loop function is prepared line = reader.readLine(); while(line!=null){//if the line is null, the code terminates spaceIndex = line.indexOf(" "); length = line.length(); word = line.substring(0, spaceIndex); suffix = line.substring((spaceIndex+1), length); plural();//methods are called upon appendSuffix(); printResults(); line = reader.readLine();//variables are declared and the lext line is read } } } Howdy all. I have Win 7, IE9. I have a HTML file on my hard drive, with Javascript within. When I load the page, it keeps popping up Do u want to allow this content, I have to click to allow. I want to stop this, and after doing some searching I found the setting in Internet Options, Advanced - "Allow active content to run in files on my computer". Perfect. Doesnt work. When i check this box, the page loads without the warning, but then the Javascript just doesnt work. Getting quite annoying, because this file is my home page. Any help would be great! I am working on a web app for the iPad and I am storing all my content in cookies. I am wondering how easy it is to transfer it to Local Storage. I'll post all the scripts that set cookies below: Code: jQuery.cookie = function (a, b, c) { if (typeof b !== "undefined") { c = c || {}; if (b === null) { b = ""; c.expires = -1; } var d = ""; if (c.expires && (typeof c.expires === "number" || c.expires.toGMTString)) { var e; if (typeof c.expires === "number") { e = new Date(); e.setTime(e.getTime() + c.expires * 24 * 60 * 60 * 100000); } else { e = c.expires; } d = "; expires=" + e.toUTCString(); } var f = c.path ? "; path=" + c.path : ""; var g = c.domain ? "; domain=" + c.domain : ""; var h = c.secure ? "; secure" : ""; document.cookie = [a, "=", encodeURIComponent(b), d, f, g, h].join(""); } else { var i = null; if (document.cookie && document.cookie !== "") { var j = document.cookie.split(";"); for (var k = 0; k < j.length; k++) { var l = jQuery.trim(j[k]); if (l.substring(0, a.length + 1) === a + "=") { i = decodeURIComponent(l.substring(a.length + 1)); break; } } } return i; } }; $(window).unload(function () { $(".remember").each(function () { $.cookie(this.id, this.value, { expires: 365 }); }); $(".draggable").each(function () { var a = $(this); $.cookie(this.id, a.css("top") + "_" + a.css("left"), { expires: 365 }); $.cookie("disp" + this.id, a.css("display"), { expires: 365 }); }); }); $(function () { var a, b, c; setInterval(checkOrientAndLocation, 1000); $(".remember").each(function () { var a = $.cookie(this.id); if (a) { this.value = a; } }); $(".draggable").each(function () { var a = $.cookie(this.id); if (a) { a = a.split("_"); $(this).css({ position: "absolute", top: a[0], left: a[1] }); } var b = $.cookie("disp" + this.id); if (b) { this.style.display = b; } }).touch({ animate: false, sticky: false, dragx: true, dragy: true, rotate: false, resort: false, scale: false }); }); function toggle_visibility(a) { var item = $("#" + a); item.fadeToggle(); $.cookie("disp" + a, item.css("display")); } var _target = null, _dragx = null, _dragy = null, _rotate = null, _resort = null; var _dragging = false, _sizing = false, _animate = false; var _rotating = 0, _width = 0, _height = 0, _left = 0, _top = 0, _xspeed = 0, _yspeed = 0; var _zindex = 1000; jQuery.fn.touch = function (a) { a = jQuery.extend({ animate: false, sticky: false, dragx: true, dragy: true, rotate: false, resort: false, scale: false }, a); var b = []; b = $.extend({}, $.fn.touch.defaults, a); this.each(function () { this.opts = b; this.ontouchstart = touchstart; this.ontouchend = touchend; this.ontouchmove = touchmove; this.ongesturestart = gesturestart; this.ongesturechange = gesturechange; this.ongestureend = gestureend; }); }; var currentRotation = null; function setOrientation() { switch (window.orientation) { case 0: orient = "portrait"; break; case 90: orient = "landscape"; break; case -90: orient = "landscape"; break; } currentRotation = window.orientation; document.body.setAttribute("orient", orient); setTimeout(scrollTo, 0, 0, 1); } function checkOrientAndLocation() { if (currentRotation !== window.orientation) { setOrientation(); } } function gestureend(a) { _sizing = false; _rotating = (_rotating + a.rotation) % 360; } function gesturechange(a) { if (_sizing) { _width = this.opts.scale ? Math.min(parseInt(_sizing[0], 8) * a.scale, 300) : _sizing[0]; _height = this.opts.scale ? Math.min(parseInt(_sizing[1], 10) * a.scale, 300) : _sizing[1]; _rotate = this.opts.rotate ? "rotate(" + (_rotating + a.rotation) % 360 + "deg)" : "0deg"; $("#" + this.id).css({ width: _width + "px", height: _height + "px", webkitTransform: _rotate }); $("#" + this.id + " b").text(""); $("#" + this.id).css({ backgroundColor: "" }); } } function gesturestart(a) { _sizing = [$("#" + this.id).css("width"), $("#" + this.id).css("height")]; } function touchend(a) { $(a.changedTouches).each(function () { if (!a.targetTouches.length) { _dragging = false; if (_animate) { _left = $("#" + _target).css("left") === "auto" ? this.pageX : parseInt($("#" + _target).css("left"), 10); _top = $("#" + _target).css("top") === "auto" ? this.pageY : parseInt($("#" + _target).css("top"), 10); var b = _dragx ? _left + _xspeed + "px" : _left + "px"; var c = _dragy ? _top + _yspeed + "px" : _top + "px"; if (_dragx || _dragy) { $("#" + _target).animate({ left: b, top: c }, "fast"); } } } }); $("#" + _target + " b").text(""); $("#" + _target).css({ backgroundColor: "" }); } function touchmove(a) { if (_dragging && !_sizing && _animate) { var b = isNaN(parseInt($("#" + _target).css("left"), 10)) ? 0 : parseInt($("#" + _target).css("left"), 10); var c = isNaN(parseInt($("#" + _target).css("top"), 10)) ? 0 : parseInt($("#" + _target).css("top"), 10); } $(a.changedTouches).each(function () { a.preventDefault(); _left = this.pageX - parseInt($("#" + _target).css("width"), 10) / 2; _top = this.pageY - parseInt($("#" + _target).css("height"), 10) / 2; if (_dragging && !_sizing) { if (_animate) { _xspeed = Math.round((_xspeed + Math.round(_left - b)) / 1.5); _yspeed = Math.round((_yspeed + Math.round(_top - c)) / 1.5); } if (_dragx || _dragy) { $("#" + _target).css({ position: "absolute" }); } if (_dragx) { $("#" + _target).css({ left: _left + "px" }); } if (_dragy) { $("#" + _target).css({ top: _top + "px" }); } if (_dragx || _dragy) { $.cookie(_target, ($("#" + _target).css("top") || "") + "_" + ($("#" + _target).css("left") || "")); } $("#" + _target).css({ backgroundColor: "" }); $("#" + _target + " b").text(""); } }); } function touchstart(a) { _target = this.id; _dragx = this.opts.dragx; _dragy = this.opts.dragy; _resort = this.opts.resort; _animate = this.opts.animate; _xspeed = 0; _yspeed = 0; $(a.changedTouches).each(function () { var b = $("#" + _target).css("left") === "auto" ? this.pageX : parseInt($("#" + _target).css("left"), 10); var c = $("#" + _target).css("top") === "auto" ? this.pageY : parseInt($("#" + _target).css("top"), 10); if (!_dragging && !_sizing) { _left = a.pageX - b; _top = a.pageY - c; _dragging = [_left, _top]; if (_resort) { _zindex = $("#" + _target).css("z-index") === _zindex ? _zindex : _zindex + 1; $("#" + _target).css({ zIndex: _zindex }); } } }); } function killAllCookies() { $(window).unbind("unload"); var a = document.cookie.split(";"), b = a.length - 1; for (b; b > -1; --b) { $.cookie(a[b].split("=")[0], "", { expires: -1 }); setTimeout("location.reload(true);", 1); } } I realize this is a big thing to ask, so if anyone has some free time and possibly wants to help me, I would be extremely thankful. Hi, Is there any way to use the activeX to execute a local aplication with parameters... Example: PHP Code: <script> var ws = new ActiveXObject("WScript.Shell"); ws.Exec("c:\\windows\\notepad.exe"); </script> function test() { var DIV = document.createElement('DIV'); } If I never insert DIV to any node its parentNode is null and being a local variuable it's reference is lost. Is it destroyed? or do I have to add it to a node then use removeChild? |