When creating and executing a ajax request queue with $.manageAjax, I call ajaxManager.abort();, to abort the entire queue due to error, at which time I get an error stating q[num] has no properties (jquery.ajaxmanager.js line 75) here is the calling code:
var ajaxManager = $.manageAjax({manageType:'sync', maxReq:0});
// setup code call...
So I know that you can do:
if ($(selector).length>0) {
// Do something
}
But is there a more elegant method?
...
I want to return StudentId to use elsewhere outside of the scope of the $.getJSON()
j.getJSON(url, data, function(result)
{
var studentId = result.Something;
});
//use studentId here
I would imagine this has to do with scoping, but it doesn't seem to work the same way c# does
...
What's the best way to go about running unit tests for Javascript? I've been playing around with Selenium IDE, but it's Firefox-specific. Selenium RC looks... difficult - but is it the best way to run tests in, say, IE6?
Also, is it worth doing? I haven't seen much about automated tests for Javascript applications, but it seems to me...
Here's my problem - I'd like to communicate between two websites and I'm looking for a clean solution. The current solution uses Javascript but there are nasty workarounds because of (understandable) cross-site scripting restrictions.
At the moment, website A opens a modal window containing website B using a jQuery plug-in called jqModa...
This most be the second most simple rollover effect, still I don't find any simple solution.
Wanted: I have a list of items and a correspoding list of slides (DIVs). After loading, the first list item should be selected (bold) and the first slide should be visible. When the user hovers over another list item, that list item should be se...
We have an application with a good amount of jQuery JSON calls to server side code. Because of this, we have a large amount of binding code to parse responses and bind the appropriate values to the form. This is a two part question.
What is the reccomended approach for dealing with a large number of forms that all have different data. ...
the datepicker function only works on the first input box that is created.
i'm trying to duplicate a datepicker by cloning the div that is containing it.
<a href="#" id="dupMe">click</a>
<div id="template">
input-text <input type="text" value="text1" id="txt" />
date time picker <input type="text" id="example" value="(add date)" />
</d...
I used the jQuery Form plugin for asynchronous form submission. For forms that contain files, it copies the form to a hidden iframe, submits it, and copies back the iframe's contents. The problem is that I can't figure out how to find what HTTP status code was returned by the server. For example, if the server returns 404, the data from ...
What is the best way to create fluid width/height rounded corners with jquery?
...
In the latest version of Wordpress it gives you the opportunity to view a preview of what your site would look like using a different heme. You basically just click on the theme and it takes over the screen and you have a chance to activate it or close it (and return to the previous screen, which is grayed out in the background). I have ...
Hi, I'm using jquery ajax to post updates back to my server. I'm concerned about making sure I have put in place appropriate measures so that only my AJAX calls can post data.
My stack is PHP on Apache against a MySQL backend.
Advice greatly appreciated!
...
Hello. I have very strange problem. Under some elusive circumstances I fail to apply any jQuery selector on my pages under IE. It's OK under Firefox though. jQuery function simply returns empty array.
Any suggestions?
Page is too complex to post it here. Practically any selector except #id -ones retur zero element array. jQuery versio...
Both the jQuery and Prototpye JavaScript libraries refuse to allow me to use a variable to select an list item element by index number although they accept a hard coded number.
For example, in Prototype this works:
$$('li')[5].addClassName('active');
But this will not work no matter how I try to cast the variable as a number or inte...
Hi,
I am looking for a little bit of JQuery or JS that allows me to produce a horizontally scrolling "news ticker" list.
The produced HTML needs to be standards compliant as well.
I have tried liScroll but this has a habit of breaking (some content ends up on a second line at the start of the scroll), especially with longer lists.
I ...
I'd like to indicate to the user of a web app that a long-running task is being performed. Once upon a time, this concept would have been communicated to the user by displaying an hourglass. Nowadays, it seems to be an animated spinning circle. (e.g., when you are loading a new tab in Firefox, or booting in Mac OS X. Coincidentally, the...
Im using the tablesorter plugin ( http://tablesorter.com ) and am having a problem with column widths in IE7, it looks fine in firefox and sometimes in IE7.
here's a screenshot of the problem:
IE7 View
and here's how it's supposed to look:
Firefox view
...
I would like to flash a success message on my page.
I am using the jQuery fadeOut method to fade and then remove the element. I can increase the duration to make it last longer, however this looks strange.
What I would like to happen is have the element be displayed for five seconds, then fade quickly, and finally be removed.
How can ...
Hello,
I am trying out the dialog from jquery ui. All the online demos use flora.css.
I can't the dialog to display correctly with the css file generated by the themeroller application.
Am I missing something? shouldn't these things work out of the box?
Update: Thanks, Brock. When I cleaned up my code to make a sample, I realized that ...
This is probably a really simple jQuery question, but I couldn't answer it after 10 minutes in the documentation so...
I have a list of checkboxes, and I can get them with the selector 'input[type=checkbox]'. I want the user to be able to shift-click and select a range of checkboxes. To accomplish this, I need to get the index of a chec...