Hi,
I am calling a webservice which return me back a json object.
The json object encodes the date. I am trying to find a way to convert that date to m-d-Y format in php.
Json object is {"DateOfBirth":"\/Date(387518400000-0400)\/"} this date is 02-15-1982.
The webservice which I am calling is in .NET, and it converts the date to the...
I've run into an odd issue. I have a javascript which uses setInterval to keep a session alive. But, it seems that if the browser is left unattended for a period (either leaving it open over night, or out of focus working in another application) the setInterval is not firing in IE and the session is allowed to expire. This does not happe...
Trying to understand a little more about Crockford's approach to Prototypical Inheritance whereby he essentially eliminates the constructor, thus eliminating any real possibility for a prototype chain or leveraging the idea of "super".
mynamespace.object.create = function( o ) {
function F(){};
F.prototype = o;
return new F(...
Hello everyone,
I have created a form with malsup's Form Plugin wherein it submits on change of the inputs. I have set up my jQuery script to index drop down menus and visible inputs, and uses that index to determine whether keydown of tab should move focus to the next element or the first element, and likewise with shift+tab keydown. H...
I'm working on a custom DotNetNuke module which requires the use of Lightbox. What's the best way to add the javascript necessary for Lightbox to a DNN module?
Nearly all the solutions I've seen involve adding the javascript references to the skin file. Is there another way to accomplish this? I'd hate to have those javascript files ...
Hello,
I have two computers that are the same at home except I have installed Adobe Acrobat 9 Pro Extended on my main computer along with the 2010 Outlook (Beta). I have issues when I log into a website that uses pop up calendars to select the date. I pasted it below. I checked my other computer and it is fine. I've checked the Java set...
I have a <textarea> element in my form that has this code attached to it:
$('#links').focusin(function() {
$('#links').animate({
height: '100px'
}, 300, function() {
// done
});
});
This works perfectly, when the text area gets focus it increases in height nicely to 100px. Now, I want it to shrink back down...
Hello !
I have some <div id="text">abc</div>.
Is it possible to get it's size using JS/mooTools (width and height) when I did not set it with CSS ?
...
I was advised to used this because i was having a problem, a link worked in FireFox ONLY when clicked the second time. This is to display an external html in a div called leftColumn.
$(function(){
$('#ulWithAllTheLinks').delegate('li a', 'click', function(e){
e.preventDefault;
$('#leftColumn').load(this.href);
});
});
My...
My friend has a search engine that he wants to have a widget access that can be put on other web pages. If I send a request to the search engine, it returns an XML file. The request would look something like this:
http://www.site.com/page.php?keyword=this+is+a+sample&page=1&num_days=3&source_id=site2.com&source_name=s...
I have a Javascript Object structured after the Module Pattern. I have several private function in it which are called from other sibling "private" functions. How can I access another variable/function without the potential to accidentally access a global/external variable/object/function?
function doSomething() {
alert("Something I...
I'm stuck trying to get the following javascript to work in IE:
var lastMonthBn = document.createElement('input');
td.appendChild(lastMonthBn);
lastMonthBn.value='<';
lastMonthBn.type = 'button'; // Fails in IE
lastMonthBn.setAttribute('type','button'); // Also fails in IE
For some reason, i cannot set the input to a button, it fails....
Hi all, I want to send some info back to my database when a user prints a certain web page. I can do this in IE with onbeforeprint() and onafterprint() but I would like to browser agnostic way of doing the same thing. Don't care which combination of technologies I have to use (PHP, MySQL, JavaScript, HTML) so long as it gets done. Any...
I have a page of search results, each of which has an icon to add each result to a group (listed on the page in a hidden UL element: display:none;).
Right now it works... but when I click on the icon for one result listing... the UL appears under every single result.
I need it to only show up for the result listing that I am clicking t...
Hey all,
Having a bit of an issue woth mootools 1.2 Tips (cutsom tooltips)
We are using Joomla with the latest update that includes Mootools 1.2 - and I have the following JS code
$$('.tipz').each(function(element,index) {
var content = element.get('title').split('::');
element.store('tip:title', content[0]);
...
How much I dig into JavaScript, I find myself asking that much. For example we have window.onresize event handler and if I say:
window.onresize = resize;
function resize()
{
console.log("resize event detected!");
}
Wouldn't that kill all other functions which is connected to the same event and just log my message in console?
If so...
Is it possible to take my existing css for a mouseover link with a background image, and make it fade in and out? Which is the best approach for a fadein/out? I'm already using jquery.
.sendB {
width: 100%;
height: 125px;
background: #5266EB url('/img/send.gif') no-repeat 50% 0;
margin-top: 22px;
float: left;
}
.s...
I'm on ASP.NET MVC and I'm using Google Maps API with Javascript. I send a Model to the View with one or more waypoints to add to the route.
function calcRoute() {
initialize();
var start = "<%= Model.StartAddress %>";
var end = "<%= Model.ClientAddress %>";
var waypts = [];
waypts.push...
I have the following code, which is supposed to try to parse a given date. If it fails, it defaults to the current date:
var date = new Date(textbox.value); // Try to parse
if (isNaN(date)) date = new Date(); // Default to current
Now i'm using isNaN() to test if it was able to parse correctly, eg to check that new Date() didn't retu...
In Dreamweaver the characters between a pair of forward slashes in a very simple calculation, like this:
var foo = Math.round(bar/3)+Math.floor(bar/2);
is read as a regex (at least by the syntax coloring). Will this break my code? Do I need to escape it somehow?
...