Compare 2 dates with JavaScript
Hi, can some one suggest a way to compare values of 2 dates greater then, less then and not in the passed using javascript. They values will be coming from text boxes Thanks ...
Hi, can some one suggest a way to compare values of 2 dates greater then, less then and not in the passed using javascript. They values will be coming from text boxes Thanks ...
Anyone have a regex to strip lat/long from a string? such as: ID: 39.825 -86.88333 ...
I'm trying to get string data from a web service and populate a thickbox with this data. I feel like this should be the easiest part of the task but so far this is where I'm stuck. Here is the code in question... function AjaxRequestHandler(layerName) { PageMethods.AjaxRequestHandler(layerName, OnSucceeded); } function OnSucceed...
I'm working on some JQuery to hide/show some content when I click a link. I can create something like: <a href="#" onclick="jquery_stuff" /> But if I click that link while I'm scrolled down on a page, it will jump back up to the top of the page. If I do something like: <a href="" onclick="jquery_stuff" /> The page will reload, whi...
I am working on a site, and everything is working in my local environment as well as on a test server I have here and everything works fine. but when I upload it to my host, nothing seems to work!? The Asp.Net javascript validators fire, but any and all of the jquery is not working? I even put in a simple $("#test").html("working");...
Is there a general way to implement part of an application with JavaScript and supplying a persistent connection to a server? I need the server to be able to push data to the client, regardless of the client being behind a firewall. Thanks in advance ...
Is it possible to get a list of the user defined functions in javascript? I'm currently using this but it returns functions which aren't user defined: var functionNames = []; for (var f in window) if (window.hasOwnProperty(f) && typeof window[f] === 'function') { functionNames.push(f); } ...
I'd like to create a String.replaceAll() method in JavaScript and I'm thinking that using a RegEx would be most terse way to do it. However, I can't figure out how to pass a variable in to a RegEx. I can do this already which will replace all the instances of "B" with "A". "ABABAB".replace(/B/g, "A"); But I want to do something like...
I have a ASP.NET page which has a form on it. It also has a search form on it. The search is in the top-right of the page, so the button for the search is the first added to the control hierachy. When you're working on the other form and press enter it will click on the search button. I don't want this, I would prefer that when you pres...
I'm working on a .NET-powered questionnaire which contains several repeater controls, each row of which contains three radiobuttons. I'm trying to write a simple Javascript function to check all the controls on the page which contain the word "chkGreen" in the control name/id. The page looks something like this: Repeater 1 Description ...
I'm trying to create an element dynamically using an HTML string. Here's a simple example using both prototype and DOM: // HTML string var s = '<li>text</li>'; // DOM var el1 = document.createElement(s); // prototype var el2 = new Element(s); $('mylist').appendChild(el1); $('mylist').appendChild(el2); Both approaches insert an empty ...
Hi All, I have a series of divs in a pattern of header/body, where a click on the header will show the body in question. This all happens with .click initialized on page ready... Rather than doing this (which works fine, but is a pain): $('#show_fold_ping').click(function(){ ShowArea('#fold_ping') }); $('#show_fold_http').click(funct...
I looked around and didn't see this question asked yet. What's a reliable way in Javascript to determine the media type (e.g. screen, print, handheld) of the page? I've seen references to document.styleSheets[0].media, but I've had no luck using this, either because of browser support issues or because I'm not understanding something. ...
I'm looking for a way to input a minified JavaScript file and end up with something readable. I understand that it won't have the original variables, they'll all be single letters, but at least it would have lines breaks and possibly tabs. Is there anything out there? ...
I have a table and I am highlighting alternate columns in the table using jquery $("table.Table22 tr td:nth-child(even)").css("background","blue"); However I have another <table> inside a <tr> as the last row. How can I avoid highlighting columns of tables that are inside <tr> ? ...
Hi, Is there a way to do object detection from JavaScript and force open a link in a specific browser? For eg: Open in IE, Open in Firefox TIA Raj ...
Javascript code: function doSomething(v1,v2){ //blah; } function SomeClass(callbackFunction,callbackFuncParameters(*Array*))={ this.callback = callbackFunction; this.method = function(){ this.callback(parameters[0],parameters[1]) // *.* } } var obj = new SomeClass( doSomething, Array('v1text','v2text') ); The proble...
I really need a localized dropdown calendar. An English calendar doesn't exactly communicate excellence on a Norwegian website ;-) I have experimented with the jQuery DatePicker, their website says it can be localized, however that doesn't seem to work. I am using ASPNET.MVC, and I really want to stick to one javascript library. In thi...
Hi, I have a bit of a problem here: #foreach($image in $command.lessonLearned.images) Image: $image.fileName <input type="submit" onclick="submitForm();setImageToRemove($image.id);setAction('removeImage');" value="REMOVE"/><br/> #end $image.id inside the onclick event is not evaluated as a velocity variable. How do I make it w...
Im trying do this basically: var tr = document.createElement("tr"); var td = document.createElement("td"); td.appendChild(document.createTextNode('<input class="param" type="text" name="dummy" value="fred"/>')); tr.appendChild(td); but it just displays the input... as normal text, how do I insert it so that it works as i ...