How to compare MySQL timestamp
I am pulling a row from a mysql database which has a time stamp, like this: 2010-10-10 16:56:23 I need to compare this time stamp to the current time from the date object, and see if 30 minutes has passed. thanks! ...
I am pulling a row from a mysql database which has a time stamp, like this: 2010-10-10 16:56:23 I need to compare this time stamp to the current time from the date object, and see if 30 minutes has passed. thanks! ...
Hey, I'm currently developing a chrome extension, I need to access some http-auth protected resources (webdav). The HTTP auth is using (in the best case) a digest authentication. I'm able to do the auth directly in the ajax request using the https://login:[email protected]/path/to/ressource form. The issue is : if the login/password...
Once again having problems being a new to javascript. I want to get the reply from my PHP script using JQuery's get. Here's my function function getNext(){ var returnData = null; $.get("get.php", {task:'next'}, function(responseText){ returnData = responseText; }, "text"); return returnData; } Now obviously...
I just updated my code to jqueryui 1.8 and it gave me this error: this._mouseInit is not a function. How would I go about fixing this? I have a widget that does mouse start drag and stop. here is my code: $.widget("ui.boxTool", $.extend({}, $.ui.mouse, { _create: function() { this.element.addClass("ui-box...
UPDATE3 and FINAL: SOLVED thanks to Evan and meder! UPDATE2: I should clarify, I need function updateFilters (a,b) to be called, not created. The function exists elsewhere. Sorry for confusion. The code below does not work as expected - udpateFilters(a,b) is being called before for loop ends. Changing async to false solves the problem,...
I'm looking to use the HTML Bridge to send data currently in an ObservableCollection to some JavaScript. I'm assuming that this data would need to be in an array, rather than in an ObservableCollection, for it to be usable in JavaScript. Note: This assumption may be incorrect. Silverlight doesn't seem to have the ToArray() function o...
I made an element dragable using element.drag(start, move, up); When I want to make the element undragable, I can somewhat achieve this using the method from the documentation: element.undrag(f); // Any undefined variable works as the argument This makes it so that the element cannot be moved anymore. This method has 2 problems: ...
So, that's the question =) How to capture mac's command key via javascript? ...
In this simple script i get the error "obj.parentNode.getElementById is not a function", and I have no idea, what is wrong. <script type="text/javascript"> function dosomething (obj) { sibling=obj.parentNode.getElementById("2"); alert(sibling.getAttribute("attr")); } </script> <body> <div> <a id=...
var game = (function() { function start() { //somefunction } function save_count(someparamt) { //somefunction } })(); How could I trigger savecount() from the browser url? javascript:savecount(); won't work and neither game.savecount() and neither window.game.savecount(); ...
I have been trying to plot markers on google map at multilple location on mouse click. After plotting markers, I want to draw a polyline between connecting two markers. A log is also provided which show the coordinates of the markers plotted and the line drawn at points between them. The problem with the code is I am unable to plot the...
I have loaded a page in Fancybox using a iframe. But when I try to perform jQuery functions within that iframe it won't work. How do I access the iframe page or content so that I can perform jQuery on that page? I tried this below but doesnt work. jQuery(document).ready(function(){ parent.jQuery("#showcasef", jQuery.browser.msie ? paren...
I'm trying to do a javascript application that needs this particular feature: Whenever the user presses one of the arrow keys, it must act acording to the key direction. And if the user press a key, hold it down, and press a second one, then, only the action of the seccond one must be executed until released. And if the first one stil...
I have what is essentially an offline web site embedded in a UIWebView. I've created a stylesheet to format everything nicely on the iPhone screen, but I need different formatting to take better advantage of the iPad's screen. I tried using code to simply copy a different stylesheet into place, but this involves modifying the applicatio...
I have a <canvas> based game which I want to port to Air. The <canvas> is 480x480, now I want to make the window size fit to the canvas, normally one would do this with innerWidth and innerHeight. Even though air changes the values of both properties, the window size remains unchanged. Of course, I could just specify the application siz...
I'm trying to wrap my head around closures in Javascript. Here is an example from a tutorial: function greeter(name, age) { var message = name + ", who is " + age + " years old, says hi!"; return function greet() { console.log(message); }; } // Generate the closure var bobGreeter = greeter("Bob", 47); // Use the closure bo...
When I click on a div, I would like to change the text inside it to New Text. How can I do that with jquery $('#mydiv').???? ...
Haven't been able to find any sort of information about this. Seems like it should be possible... Is there any way to change the hue of an individual element (like say an image) with js? ...
Hi everyone, I'm working on a bit of JavaScript that interacts with a client-side SQLite database, via the newish window.openDatabase(...), database.transaction(...) and related APIs. As most of you know when you execute a query in this way it is an asynchronous call, which is typically good. You can make the call and handle the results...
Hi, I have a complicated UI structure which is manipulated dynamically, and say I have an ui_state object where i keep user's latest UI states such as which tab was visible, what was inside that tab etc. For instance: var ui_states = { tabs : [ { name : "some tab", active : true, children : { ... } }...