jquery

What should a JSON service return on failure / error

I'm writing a JSON service in C# (.ashx file). On a successful request to the service I return some JSON data. If the request files, either because an exception was thrown (e.g. database timeout) or because the request was wrong in some way (e.g. an ID that doesn't exist in the database was given as an argument) how should the service re...

Using JQuery autocomplete and external Json url in sharepoint 2007

I am trying to implement autocomeplete box in a custom webpart in sharepoint 2007. When i use a static file in same domain (for textbox with id f1) everything works fine but when I use a remote url that gives a json output (for textbox with id f2), it gives a Permission Denied error in javascript. In the final page following is the HTML ...

jQuery: How do I load hyperlinks as $.get callback?

How can I delay loading of an anchor link until after a $.get request has gone out? I have $("a.track").click(function() { $.get("track.php", { id: "page1.html" }); }); ... but clicking on the link loads the new page before the above request goes through (my response on the PHP page is not recorded). If I stop the link using ret...

JQuery Ui or AjaxControlToolkit ?

I´m building an asp.net app, which technology I should use to get AJAX capabilities? And why ? By now I only need to use a Confirmation button into a gridview, but possible more features will be needed. I can use both, right? Thanks. ...

Persist nested jquery sortable list

The Problem: I have a nested list on my configuration page that looks like this: <a id='Save'>Save<a> <ul id='configuration-list'> <li id='e1'>Elem A <ul> <li id='ey'>Elem Y </li> <li id='ex'>Elem X <ul><!-- and so on until 5 levels of nesting --></ul> </li> <li id='ez'>Elem...

Jquery Tabs - Too many tabs

Hi, I am using JQuery tabs. The problem is when there are too many tabs, some tabs are squeezed to the next line and the layout looks weird. I am not setting the "width" property of the <div> of the tab. Is there anyway to have the <div> to auto stretch instead of squeezing the tabs to the next line? Thanks for the help ...

Refreshing div (cause browse to redraw it)

In a web application I'm hitting some troubles with dynamic content - where by a form being hidden or shown above a jquery ui tab control causes rendering issues until the user hovers there mouse over the tabs, which then causes the tab header to redraw in the correct location. It's only occuring in IE7 and as a quick hack I'm doing thi...

jQuery css modifier, use a javascript variable

I have this line of jQuery: $("#colorimage").css('background','url(images/bw.jpg)'); First question: the way that this is working, when the background image is set with CSS via jQuery, from where is it looking for the images folder? Second question: is there a way I can insert a Javascript variable into the second argument? I have a ...

creating something like pageflakes

anyone know of a tutorial that lets you create something like pageflakes.com for your website? in jquery perhaps? ...

Jquery Help : Draggable to Sortable and then back to draggable again.

I have a pool of items in the drag list which is connected to a sortable using connectToSortable option. Now I want to remove some items from this sort list and move them back to the drag list. Sort of like an undo. Suppose the user moves some 5 items to sort list and decides he/she wants only 4 items, and decides to just drag the unwant...

Weird JQuery Error

I'm getting the following error when trying to use JQuery with the JqSOAPClient plugin: http://plugins.jquery.com/project/jqSOAPClient Error: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS...

How to fix this JQuery intellisense in Visual Studio 2008 problem?

How can i solve this problem "Error updating JScript IntelliSense: D:\myProject\js\jquery-1.3.2.js: Object doesn't support this property or method @ 2139:1", i did all in this Visual Studio jscript intellisense error with jQuery 1.2.6? But no hope, should i edit something in my Visual studio options, or Visual studio has a problem? ...

Too much recursion while performing .next in jQuery 1.3.2

I've just upgraded to jQuery 1.3.2, which has mostly been fine, but I'm missing something when it comes to the new event model (I think) $(document).ready(function() { $(".AspNet-Menu-NonLink").click(function() { $(this).next($("ul")).slideToggle("fast"); }); $(".AspNet-Menu-NonLink").next($("ul")).hide(); $...

jQuery UI Datepicker - Disable specific days

Is there any (easy) way to set the jQuery UI Datepicker to disallow selection of specific, predetermined days? I was able to get this approach working, however, it produces a null error which prevents it from displaying in IE. 'natDays[...].0' is null or not an object Thanks in advance! UPDATE: Might help if I included some code,...

How to retrieve a value from <input> using jQuery?

I have to hidden input fields such as: <input name="foo" value="bar"> <input name="foo1" value="bar1"> I'd like to retrieve both of those values and POST them to the server using jQuery. How does one use the jQuery selector engine to grab those values? ...

Hijacking Form Submission on ASP.NET MVC with jQuery (or other)

I'm using ASP.NET MVC (v1.0) on an app and want to integrate simple client-side form validation. IE: Numeric-Only fields, required fields, etc. Is there good, and potentially eye-candy fancy, method of validating in jQuery on the client that will cancel form submission on failed validation? I've perused and experimented with quite a fe...

Why isn't my serverside callback occuring when I use 'jQuery ajax' in seaside 2.9?

I'm trying to do something like this in seaside 2.9 html button onClick: (html jQuery ajax serialize: (html jQuery this); script: [:s | s << (s jQuery id: stratId) append: [html text: 'bing'. html break]]); callback: [2 inspect]; with: 'add option'. and as I expect my div with stratId is getting appended but I'm not getting an ...

Javascript and radio buttons. How do I get the vals?

Hello all, New to SO and javascript. I have been playing with JQuery for a couple of days now and I have a problem that I can't seem to solve. I have absolutely no js experience at all so if someone could help me out by literally spelling out what the issue is, I'd be gratful. I have a single group of radio buttons that will determine ...

In JQuery, how can I select a hidden element?

Hi,I have a question. How can I select the which display is none? Given code like this: <p id="p1"> <span id="test1" style="display:none">test1</span> <span id="test2" >test2</span> </p> I can select the whose id is test1 by using $("span[id='test1']"),<br/>, but it does not work when i use $("span[style='display:none']").<br/>. ...

Is it possible to stop execution in javascript/jquery???

Basically I want to be able to wrap any command in a $.holdTillFinished() method that will not allow execution to continue until the specified method/jquery animation is finished executing. I suspect that this may be difficult or even impossible in javascript, but I'm hoping someone will know. I don't want to hear about how I can pass ...