jquery

Ajax and JSON response bug in Internet Explorer (works in all other browsers)

For some reason IE is asking us to download a file instead of running it as ajax. This works in all browsers except IE. I tried messing with the headers that it returns with no luck. The function grabs form data then post's it the response is a can be an array of any number of items to be updated on the page. Its not suppose to be fi...

PHP File Download using POST data via jQuery AJAX

So I know there have been a number of similar posts, but I think this is enough of a variation to warrant its own question: I am building an XLS exporter in PHP and jQuery. I am trying to POST an array with jQuery (which I believe is going to be too long as a GET querystring), and use it to generate an XLS file on my server, which the ...

Combining document ready scripts?

Hello, I'm using a simple show-hide script on various IDs. The issue is as it stands right now each is a seperate JS that calls the document ready function via jQuery. Is there a way to combine this into one more flexible script or at least into one script in some form or another. Thank you so much for your time in advance! Below is a...

FullCalendar - how to disable prev button

How do you disable the prev button when the previous month is less than the current month? For instance, if the current month is August, then I want to disable the prev month button so that you cannot see the month of July. ...

Using JQuery with Raphael

I have created an image map with Raphael. I want the div containing the Raphael canvas to fade out using JQuery when one of the paths in the image map (path10 in the example below) is clicked. The code below does not work, but am I on the right track? <script type="text/javascript" charset="utf-8"> window.onload = function () { ...

Returning only the latest callback in Javascript/jQuery?

I'm trying to build a simple autocomplete list: DOM: <input id="example"/> <div id="results"></div> Javascript: $('#example').keyup(function(e) { $('#results').empty(); $.getJSON('Search?input=' + $('#example').val(), function(response) { // This attaches the results to the results div updateA...

jquery: get value from clicked div

<div>'.$i.'</div> $i is auto generated by loop - which could lead to: <div>'.$i.'</div> <div>'.$i.'</div> <div>'.$i.'</div> etc. where each $i is different. How do I get value of particular $i (using jQuery), when div is clicked. In standard JS I would use onClick($i). In jQuery I just do not know, how to pick that val. ...

Using reCaptcha, Lightbox, and Drupal's Form API together

I've been wading through the issues of putting a Drupal form in a Lightbox2 lightbox. Perhaps wrongly, I've resorted to doing all the validation in javascript before submitting the form (I couldn't make the normal validation return the form within the lightbox). Anyway, i'm using: $form['#attributes']['onsubmit'] = 'return Drupal.m...

Setting a jQuery slider maximum value to unlimited?

Can you set a jQuery slider to have a maximum value of 10,000 - but then if moved at all to the left it scales as though it was a slider of between 1-50 (if they move it to the right it returns to the very high value). So it would be something like: min: 0, max: 50, secondmax: 10000, (<- this is what I need to figure out). values: [...

How to select more than one option in multiple selection list using jquery?

In my web application a method returns a list of array contains ID's of select options which should have to be selected. Its is hard to make them all selected using DOM methods. Is there any way to do it using jQuery. Any suggestions would be more appreciative... Thanks in Advance!!! ...

Jquery and Protoype Conflict

<blink> <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/prototype/1.6.1/prototype.js'&gt;&lt;/script&gt; <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2/scriptaculous.js'&gt;&lt;/script&gt; <script type='text/javascript' src='/lightview.js'></script> <script type='text...

MVC + jQuery: how to create an input text through Html.TextBox() and specifying a "class" attribute

I'm trying to create an input text through the following code so it can hold a date that user can choose in a date-picker jQuery control: <%: Html.TextBox("date", null, new {class = "date-pick"}) %> <input name="date" id="date" class="date-pick" /> Problem is, I need to specify the "class" attribute for the input text, but...

jquery: Remove first easySlider instance and reinitiate a different one

I'm using easySlider and masonry but I'm having problems in using multiple instances of easySlider. What I'm trying to do is to remove the first instance of easySlider and then create a new instance that has new set of images. Here's a demo. But it doesn't seem to work correctly. When you click box#1 (CM Partners) the slider works gre...

How to sequentially load images from an AJAX call [Web Development] ?

I have a real estate application that display homes. I use AJAX to populate a fixed height/width DIV "window" with home listings. Many times, the DIV window can be populated with literally a 1,000 or so house listings. Each house listing includes one picture of the property and each house listing is about 100px tall (each "row" is 100...

What are the risks of cross domain JSONP communication?

In our web application we have run into the situation where we need to do a cross-domain AJAX calls from one domain we fully control to another domain we fully control. I've been surfing around for the best solution and the two that come to mind are a local file proxy (local file using php::fopen) or jquery/JSONP. When I look up online ...

Object doesn't support this property or method on error on IE 8

Hi I have this function in javascript file which works perfectly fine in Firefox / Chrome but for some reason throwing 'Object doesn't support this property or method' error on IE 8 . Any ideas how should I rewrite the function so it is working in all sort of IEs? validateStep1: function () { var digitOnly=/^\d/; var res...

jQuery, get html of a whole element

Simple question, I wish to get the entire html of a selected element not just it's contents. .html() uses javascripts innerHTML() method according to the documentation. HTML: <div id="divs"> <div id="div1"> <p>Some Content</p> </div> <div id="div2"> <p>Some Content</p> </div> </div> Using $('#divs:first').html(); will...

How do I compare two arrays (which can have: DOM elements, numbers, strings, arrays or dictionaries) using jQuery?

I found this method: Array.prototype.compare = function(arr) { if (this.length != arr.length) return false; for (var i = 0; i < arr.length; i++) { if (this[i].compare) { if (!this[i].compare(arr[i])) return false; } if (this[i] !== arr[i]) return false; } return true; } var a = ['aa'...

Filament Group Menu controls not working in JQuery 1.4/JQueryUI 1.8?

I downloaded the menu from Filament Group, which was designed for JQuery 1.3.2. I tried it in JQuery 1.4, and it works, but the rest of the page gets messed up. Any help would be appreciated. The widgets that do not work are autocomplete and checkbox. ...

IE8 forces compatibility mode when using jquery.animate()

I've been fighting against IE8's compatibility mode all day and I'm about to chuck a brick at it. I have some code, which uses jquery 1.2 (yes it's old - can't change that), to search for some records in our web app. The results of the search can be clicked on to view the contents of the record (by using .animate() it opens a space und...