jquery

Always get the error callback on jQuery.ajax (Rails)

I'am having a strange error, likely it is a server-side issue. My error callback is always triggered, even when the response status is 200! Javascript //client function save_pomodoro(){ j.ajax({ url: '/app/save_pomodoro', dataType: 'json', cache : false, success: save_pomodoro_suc, error: save_pomodoro_err, ...

plotting negative numbers with flot / jquery

I know Im missing something retarded here... All Im trying to do is graph f(x) = 2500 for a range of x from -75 to 75. This should make a horizontal line. Right now, I think its a misunderstanding on my part of some specifics of arrays. It starts at 0 and goes to 75 fine, it does not graph lower than 0. (I get half the line) for(x = -75...

jQuery AJAX call messes up character encoding

I have a servlet that outputs JSON. The output encoding for the servlet is ISO-8859-1. Pages in our webapp are also set to ISO-8859-1. I would use UTF-8, but this is outside my control; we have to use ISO-8859-1. When I hit the servlet by itself, I can see JSON data that has been outputted. The character encoding is correct, and none of...

Sorting issues in flexigrid with "json" data

I'm currently using flexigrid to display data in a current project, but am running into issues with its ability to properly sort certain columns that contain dates or numbers. The data is being sent from a ColdFusion CFC that selects the appropriate data and then delivers it in the proper "json" format. As the date/time stamps and other ...

Trouble with Firefox and jQuery blockUI

I have been building a site for learning purposes and have recently added pagination which also through Ajax. Well, I want to use blockUI for the beforesend: function for Ajax to show a "processing" box over the div that will have its content updated. It seems I can get it working fine for Internet Explorer, but when I try to use Firefox...

DRY programming with jquery

Posting as a jquery newbie. I am sure there must be a way to condense the code below in a DRY fashion. Essentially this is just a show/hide that is applied to multiple elements on a page, all using the same template and naming conventions: $("#homelink1").hover( function() { $("#poptext1").show(); }, function() { $("#poptext1")....

How to use JQuery Slider control without loading JQuery ?

I want a use a Dual Slider (Range) HTML control, similar to the JQuery dual Slider, without having to load a huge JavaScript framework just to use it. Does such a dual slider control exist, that is light weight (filesize) and doesn't require me loading any JavaScript frameworks? ...

How do I use Node.insertBefore to add content to a specific node

I am trying to add a string variable as a child of a node. The code that I'm using looks like this $(this).parentNode.parentNode.insertBefore('content',$(this).parentNode) I believe that this is correct syntax, but I keep receiving NOT_FOUND_ERR: DOM Exception 8. Does anyone have any pointers? ...

How do I use Google Closure compiler to remove used JavaScript code?

How do I use Google Closure compiler to remove unused code? I am using the JQuery Slider control but am not using anything else within JQuery. So I read that Google Closure compiler in Advanced mode can remove unused code, but I don't know how. I have frontpage.html that links to an external JQuery, JQuery UI and JQuery Slider control ...

How to call a function after a div is resized with the resizable() function?

Hi, I was wondering after I resize a div that has the .resizable() feature on it, how do I make it call a function as soon as the user resizes the box and lets go of the mouse? Thanks! ...

why isn't jQuery loading?

When using an importjs() type of function (see below for an example), jQuery doesn't seem to be loading before the code following it. Here's a sample html file: <html> <head></head> <body> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt; <script type="t...

UpdatePanel Breaks JQuery Script

This is a simplified version of what I want to do. Basically I have a datalist with a bunch of stuff in it and when you mouseover items in the datalist I want jquery to hide/show stuff. The problem is that after I databind my gridview/repeater/datalist jquery quits working if the gridview/repeater/datalist is in an update panel. After...

Block some characters from being typed in a text box?

Hi, I'd like to block users from typing certain characters in a text box (want to only allow [a-z], [A-Z], and underscore). I took this from a previous Q, but if I press the arrow keys (in FF 3.6), I get a js error: "window.event is undefined" this is the original code, what can I change window.event to in this case?: $("#myTextBox"...

jquery-ui tabs with fadeIn?

I have a small JQuery Tabs widget in a sidebar that fades in when the page loads, discreetly calling attention to itself and the interesting content behind the tabs. To build on this effect it might be nice if the individual tabs could fade in one after the other. Can this be done, and if so, how? ...

In jQuery, if I add a resizable feature to a div, why does it add a weird style to it and how do i fix it?

Hi, I have a click function setup to make a div resizable. When I click on the div, the style has white lines and is all spaced out, I am guessing it might have something to do with the jquery ui css file? How would i go about styling it? Example: http://www.fissiondesigns.com/simon/ try clicking on one of the boxes on the image. Than...

is it possible to prevent jquery dialog box from showing when the page loads?

Hey guys I was not really sure how to word the title to make it short, but my question is when my page loads, it includes a jquery dialog box is supposed to start off closed. It does but when the page first loads, the contents of that box briefly show before disappearing when the page is finished loading. It looks a little awkward so I w...

MVC partial View jQuery datepicker removing previous date pickers

I have a page where I am trying to add Children to a Parent object. On the page, I have a link, "Add Child", that calls an ajax get, returning a partial view with textboxes for the Child. In the sucess, i am doing a function to add the results to the innerHTML of a div. On the partial view, I have a textbox for the Birthdate, named "B...

printing an html page with javascript canvas charts and small margins. pdf or print?

i need some advice. i have an html page that i need precise control over when printing. using @media and @page and css styles etc i have given it all the attributes for printing i want, but the margin is really still governed by the browser (let's not debate the relative benefits here of browser control, suffice it to say i need it to pr...

In jQuery, how do you destroy resizable() feature after your completely finish resizing?

I have a application when you click on a div it starts a resizable function on the div, but when I click off of it, or click on another div how can i destroy it? I don't think the stop: function(){} will quite do it because it will destroy it after one resize. Any ideas? I have an example here: http://www.fissiondesigns.com/simon/ Yo...

How to prevent page from refreshing when AC_FL_RunContent() is called twice

I'm using JQuery to create a button that (when clicked), removes a flash video from the page. Note: Unfortunately, I can't simply use hide(). I must remove() because hiding doesn't stop the video in ie8 and the sound continues to play. After the video is removed I would like it to reappear when a "show video" button is clicked. Note: ...