javascript

jQuery Datepicker changes date to today

Hello, I'm using jQuery Datepicker but I'm having trouble when editing records. // js code $(function(){ $(".datepicker").datepicker().datepicker('option', 'dateFormat', 'yy-mm-dd').datepicker('option', 'changeMonth', 'true').datepicker('option', 'changeYear', 'true'); }) // the input <input type="text" name="valid_from" value="20...

XmlHttpRequest with If-Modified since, webserver returns "400 Bad Request"

LS, Whenever I use the following code, the webserver (running IIS 7) refuses to send me content, but sends a "400 Bad Request" instead. request.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT"); Kind regards, Matthias Vance ...

ASP.NEt Tabbing Order lost when scrolling in IE

Hi Guys, I have a ASP.NET web page that contains many textboxes. Each textbox has a tabindex set. When I am tabbing through the textboxes, if i decide to click on the scroll bar to navigate the page up/down then return tabbing the tab order is reset. The tabbing begins at the start. I am using VS2008 and the browsers causing the pr...

How can I implement lazy loading on a page with 500+ images?

I basically have a booking engine unit results page which must show 40 units and per each unit there's 1 large image of the first thumbnail and an X number of accompanying thumbnail images. I've been using the jquery lazy load plugin, but it's not thorough enough ( I'm invoking it on DOM Ready ), plus it doesn't really work in IE ( 50% ...

Is there any web service for getting tidal information outside the US?

Has anyone come across a web service or plugin/code/calculation for getting information on tides - namely high and low tide times? I only need this information for one location (outside the US) but I need it on an ongoing basis so a web service that I can hit once a day or something would be ideal. ...

Jquery hook image-starts-loading event

I use some jquery to centre images on my website: fixImg = function(){ w = $(this).width(); if (w > 500) $(this).css('margin', '10px ' + (parseInt((800-w)/2)-30) +'px'); }; $(function() { $('#pagecontent img').each(fixImg).load(fixImg); }); The problem is they only get centered after the entire page has loaded. I...

Why is this javascript code not running in FireFox

Hi All, <div> <span id="NewWindowDetectionStarter1"> <a id="ctl03" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl03&quot;, &quot;&quot;, false, &quot;&quot;, &quot;Home.aspx&quot;, false, true))"></a> <a id="ctl04" href="javascript:__doPostBack('ctl04','')"></a> </span> </div> <scri...

Create a menu as shown on this site

I've seen this exact menu on two unrelated sites. How would I mimic it? Is it made with some popular framework? Collapsed/normal state: Normal State Image Here's the fly out state: Flyout State Image You can see the menu used on BNET and on TechRepublic ...

Scriptaculous Drag: How do I offset the dragging element?

This is an age old problem - but now I'm using scriptaculous its come back to haunt me. When dragging a tree node over other tree nodes I want mouseover to fire for each node I drag over. So I want to position the dragging thing so that its top-left is slightly below and to the right of the mousepointer can anyone help? - thanks ...

UI suggestions on how to display suggested tags for a given text to a user?

I am writing a web-app that uses a tagging system to organize the user's submitted reports. Part of it uses ajax to get suggestions for tags to present to the user based on the content of their report. I am looking for suggestions on how to present this information for the user. I'm not quite certain what a friendly way to do this woul...

get image from iphone, using phonegap camera api

I'm new to Xcode and iPhone apps. I want to select an image from iPhone (camera or library) and send to php via ajax. http://wiki.phonegap.com/iPhone:-Camera-API I'm using the phonegap framework, Xcode iPhone SDK version 3.1.x. On clicking button it calls function with parameter 0 or 1, but it does not initialize camera or display the...

how to pass javascript variable to the jstl code

I have something like the below code. I need to pass the variable selectedIndex to the JSTL code. How can I do this? function updateSP(selectedIndex) { <c:if test="${entry.key eq IC.oList[selectedIndex]}"> } ...

possible to auto zoom out if user's resolution < x ?

my site is aimed purely at the laptop market (dont ask why or argue!), all my users (or 95%+) we on a screen width of 1200+, netbooks are now taking off, with a resolution of 1024 wide. my site still looks great on a netbook if you zoom out once (ctrl-minus), but i don't want to rely on users knowing about ctrl-minus. what are my opti...

How can I create an HTML text field that has scrolling background images before it is clicked?

I'm looking to add a textbox on my website that captures a single email address. Behind it, I would like scrolling (or sliding) images to be a "hint" for what the field should be. Example: http://steamboat.com/ - the "Newsletter sign up" toward the top of the page. I can find plenty of jQuery plugins that provide a plain text "hint". ...

Recurring Appointments in Dynamics CRM

It doesn't look like Dynamics allows for recurring appointments. I found a tutorial for recurring service activities, but I don't really follow the portion where it sends a SOAP object. If anyone can help I would appreciate it ...

SWFObject redirectUrl not functional with ExpressInstall

How do you specify a redirect URL for the adobe flash express install? I'm using swfobject 2.2, and while I thought MMredirectURL in the flashvars might be what I needed, this just doesn't work. I also tried setting redirectUrl in the attributes object before embedding the swf, but this doesn't work either. What is the proper way to spe...

synchronize two scrolling bars in multiple selection box...

hi i am newbie to javascript.... i want to synchronize scrolling of two select boxes, so that when i scroll down the first select box the scroll bar of another select box also scrolls.... ...

Flexigrid built with jquery: does it support right click row functionality?

Flexigrid is awesome but does anyone know if it supports a right click event on a row? ...

Formatting a date string when the string sits inside another string

Hi, I'm trying to figure out a way to format a date string that sits inside string using javascript. The string can be: "hello there From 2010-03-04 00:00:00.0 to 2010-03-31 00:00:00.0" or "stuff like 2010-03-04 20:00:00.0 and 2010-03-31 00:00:02.0 blah blah" I'd like it to end up like: "stuff like 4 March 2010 and 31 March 2010 ...

JavaScript types

Hi, As per http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf, JavaScript has 6 types: undefined, null, boolean, string, number and object. var und; console.log(typeof und); // <-- undefined var n = null; console.log(typeof n); // <--- **object**! var b = true; console.log(typeof b); // <-- boolean var str = "...