jquery

jquery json multidimensional array lengths

I'm using a jQuery ajax json call to retrieve a 3 dimensional PHP array into Javascript. the PHP array looks like this: $rate[0][1]['name'] = 'guff'; $rate[0][1]['value'] = 'puff'; $rate[0][2]['name'] = 'guff'; $rate[0][2]['value'] = 'puff'; $rate[0][3]['name'] = 'guff'; $rate[0][3]['value'] = 'puff'; $rate[...

JSONP + onbeforeunload + back button + problems

Hi All, I am trying to make a JSONP call to a server on the 'beforeunload' event. This all works great until I start playing with the back button. If I navagate away from the page and then press 'back' next time the beforeunload event gets called it appears to make the JSONP request but the server never receives it. Note(1): This ha...

jQuery: How to select the values from the table's column based on tables header only

Hello, I have a table with header ID. I need to select all the fields under this header. I don't have access to the source code and no classes are used in this table. Any idea on how to get this done? ...

jQuery + MySQL Noob Problems

I'm trying to get this to work, but no luck. It's 3am, so that may be the problem. What am I missing here? I'm trying to insert some data via jQuery to a local MySQL table. If I run save.php on its own, it inserts a blank row in the DB, so that works. Any ideas? **index.php** <html> <head> <link rel="stylesheet" type="text/css" hre...

How to...Add Client Side function to button that postsback?

I have a button that closes a modal dialog box on an ASP.NET Ajax form. How do a add a client side function to be called on the same button click? currently firebug has this for the onclick javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$DefaultContent$btnPaymentActionDetailClose", "", true, "", "", false, f...

Flash uploaders (Uploadify and SwfUpload) - problems with special characters in filenames

I need to implement a flash-based file-uploader, that will allow me to upload multiple files at once and view progress. I tried Uploadify and SwfUpload and it was quite easy getting them to work. However, for both I run into problems, when the users try to upload files, that have filenames with special characters (such as Danish æøå or...

jquery shake on mouse over?

Hi, is it possible to shake a table row if mouse over? and if so how? =) I have done it before when calling a div, but I havent as yet use the mouse over function, any help appreciated Thanks =) ...

Converting from prototype to jQuery - javascript / ajax

I'm looking for some help converting this from prototype to jQuery. I'm doing some free work for a charity and updating a system they use to track and assign volunteers. I've managed to convert everything else so far, however, this has me stumped. Please excuse the spelling mistakes, the code is verbatim what I've been given. I've had ...

Traversing an unordered list using jQuery

This should be an easy one, but I'm not finding much online: I have an unordered list <ul>, with a few list items underneath it <li>, and I'd like to address each one in the list, and act on it. How can I do this using jQuery? Thanks. ...

Phone Number Validator/Filter using jQuery or Zend Form?

I'm thinking about adding some validation/filtering to the phone number field of my Zend Framework application. Not sure if this is something I should do or not. I thought it might be helpful for users to have such a feature so I could enforce a particular display format. I'm not sure if the formatting of the phone number should be stor...

Reference outside object in ajax callback function

A simplified example: // Let's create a new object function MyObject() { // } // Add some method to this object MyObject.prototype.myFunctionA = function() { // } // Another method MyObject.prototype.myFunctionB = function(arg) { // AJAX GET request $.get('script.php', { par : arg }, function(data) { ...

jQuery1.3.2 change multiple same name class only use css(name, value) method. don't use css(name)

looking at the snippet. If you want to use jQuery css method change class LabelHeader both IE and FF, you only use each mehtod + css(name,value). $("document").ready(function() { var cssObj = { 'width': '500px', 'height': '460px' } var cssLabelHeader = { '...

jQuery Disable/Enable status of Droppable/Draggable

I tired to explain this yesterday, but I don't think people understood it. I posted up the code and example at http://www.whatevercorp.com/problem/ I haven't worked with jQuery in a while, but have search everywhere for a disable('enable')/disable example or a way to change droppable status on the fly. Basically I have 2 questions: ...

Javascript - if statement not working?

I'm trying to set a class to active depending on the url. I'm trying to use the code below, but in every case, it activates the active class for the second tab. var pathname = window.location.pathname; if(pathname = '/learn/subsection2') { $("ul.tabs li:eq(1)").addClass("active").show(); //Activate second tab ...

How to tell if browser/tab is active

I have a function that is called every second that I only want to run if the current page is in the foreground, i.e. the user hasn't minimized the browser or switched to another tab. It serves no purpose if the user isn't looking at it and is potentially CPU-intensive, so I don't want to just waste cycles in the background. Does anyone ...

How would I go about plotting "live" stock market data with Processing, jQuery, Pure Data or Max/MSP?

This is intended as a question quite open to any suggestions, hints or pointers. I wish to start playing around with home brewed automated investment models, the beginnings of which I have concepts for. I'm familiar with a few frameworks/languages that I suspect might be able to help me in this. Suggestions regarding other languages than...

jQuery: append a templated box with some inner html

Sorry if my title is not clear, I'm not sure how to word this. I'm new to jQuery, and here is what I am trying to do. I want to show one or more announcement boxes on top of the webpage. Let's say I have some kind of template "div" element with a class name, some html to make it into a pretty box. And a placeholder or something, where ...

prettySociable IE issues..

I'm trying to use the jQuery script prettySociable, which works fine in all other browsers except for IE - am using IE 8 and have tried testing it in compatibility mode to no avail. I've tried to figure out the errors, but can't seem to get them to work.. http://www.souliejolie.com/2010/test.php ^^ the 'demo' page which craps out in IE...

jQuery / Javascript - Show / hide ID if current url contains /foo/

Hi Folks, I am using jQuery currently and I am looking for a way to hide if the url contains /blah/. Thanks in advance for your help. I am a js Noob and know it can be accomplished with regex somehow but don't have the time to learn this right now. I have a deadline I need to meet! Thanks, Jack ...

How to align the jquery maphilight to center?

Hi guys, yes i know how silly and dumb this question is, but i have been looking around and i can't find how to align the image so that i can position it in the middle for the excellent jquery maphilight, what i found is after the class="map" is applied to the image, it will automatically shift to the left. i can find any options to se...