jquery

Getting 'Last Child' of Div ?

Is there another way to get the last child of a div element other than using p:last-child which does not work in IE at least? ...

Getting elements using Javascript

I have a bunch of input elements that have a particular substring in their IDs. Using javascript, is there a way to get these elements as an array? I wouldn't know the full ID - only the substring. Is this any simpler if I use JQuery? ...

Is it possible to AJAX a file upload?

I dont want to use jQuery, but id like to AJAX a file upload. is that possible? if so, where could i find information / tutorial on it? THANKS! ...

jQuery: Using an <a> link to submit an ajax query

I am trying to send a php script some content to be stored in a database via ajax. I am using the jQuery framework. I would like to use a link on a page to send the information. I am having trouble writing the function that will send and receive the information, everything that I have tried is asymptotic. EDIT The idea is that the user ...

Official way to ask jQuery wait for all images to load before executing something

In jQuery when you do this: $(function() { alert("DOM is loaded, but images not necessarily all loaded"); }); It waits for the DOM to load and executes your code. If all the images are not loaded then it still executes the code. This is obviously what we want if we're initializing any DOM stuff such as showing or hiding elements...

Change table border color using JQuery

I have a user control that conatins HTML, like this: <table id="tblProgramInfo" runat="server" cellpadding="0" cellspacing="0" class="ProgramInfo"> <tr> <td> <table cellpadding="0" cellspacing="0" width="100%" class="tblProgram" abc="def"> <tr> <td> Some data </...

JqGrid addJSONData + ASP.NET 2.0 WS

Dear community ! I am a bit lost. I' ve tried to implement a solution based on JqGrid and tried to use function as datatype. I've setted all by the book i guess, i get WS invoked and get JASON back, I got succes on clientside in ajaf call and i "bind" jqGrid using addJSONData but grid remains empty. I do not have any glue now... other "...

Finding the id of a parent div using Jquery

I have some html like this: <div id="1"> <p> Volume = <input type="text" /> <button rel="3.93e-6" class="1" type="button">Check answer</button> </p> <div></div> </div> and some JS like this: $("button").click(function () { var buttonNo = $(this).attr('class'); var correct = Number($(this).attr('rel')); ...

DataTable to Json using jquery

I'm trying to execute a web service which returns a DataTable with the following piece of code: $.ajax({ type: "POST", url: url, data: data, contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { //do things } }); If the webservice retur...

Using jQuery, how can I store the result of a call to the $.ajax function, to be re-used?

Thanks for reading this. I imagine this is really a javascript question, and my title probably does not get at the heart of what I am trying to do, but I want to store the result of my ajax request in a global variable. This would allow me to test the var before making the ajax call...and avoid repeated ajax calls for the same data. I n...

Automatic image upload and display in a form

How to make the browser upload and display image after the user puts it in the file upload widget? I've got a form where an image should be uploaded and edited by the user on the fly (before they hit submit). Can I do it with Jquery? ...

Json JQuery conflict

Our enterprise app currently uses Json.js I downloaded the JQuery js file, included it in a page that uses json and I started getting Javascript errors in the json.js file. The error is: Microsoft JScript runtime error: Object doesnt suppor this propety or method Is this a known issue? EDIT: I am not sure where this json.js file was...

jQuery stop working on updated page via Ajax in ASP.NET MVC

Hi everyone!! I have a ASP.NET MVC page of Events of a specific day. I'm also using jQuery datepicker and when I select a day, I create a function that send this selected day via Ajax to a MVC ActionResult method and this method will treat this day, will do all the database stuff and will return me all the Events of this selected day. S...

jQuery mouseout firing when injecting child element

I'm trying to create a function which will add an overlay to a thumbnail image when you hover over it and remove the overlay when you leave it. Here is my HTML... <div class="thumb"><img src="i/testThumb.gif" /></div> And here is my jQuery... $('.thumb').live('mouseover', function(event){ if($(this).find('.overlay').length == 0){...

Where do you include the jQuery library from? Google JSAPI? CDN?

There are a few ways to include jQuery and jQuery UI and I'm wondering what people are using? Google JSAPI jQuery's site your on site/server another CDN I have recently been using Google JSAPI, but have found that it takes along time to setup an SSL connection or just to resolve google.com. I have been using the following for Google:...

jQuery and Auto-populat selects

Hey, I have a simple page where I can select a client, then once I chose that autopopulate to the projects that belong to the client. I am using PHP/MySQL to pull the results. I took at a look at this: http://remysharp.com/2007/01/20/auto-populating-select-boxes-using-jquery-ajax/ but I think that starts with both fields on the page. ...

Adding event handler to an iframe using JQuery

I want to assign a keydown event handler to an iframe. Something similar to the pure JS: document.getElementById('iframe_id').contentWindow.addEventListener('keydown',funcName, true); I tried: $(document.getElementById('iframe_id').contentWindow).keydown( function() { // my func }); But it does not work.. Please help! ...

Get frame source with jQuery (after the source has changed)

This jQuery will return the source URL of a frame: $('#frame-name').attr('src') But if a link inside the frame is clicked, the original source is still returned. Is it possible to detect the new source URL? Or get the source of the new document loaded in the frame? If either of those is a yes, are there security constraints if the so...

jQuery: form returned on "success" needs re-binding

hello. a quick question. I am using the jQuery.forms.js plug-in. I have a form that posts to a php page and returns data with jSon. The data that is returned is code for a new form (it replaces the form that was used to post the information). The new form is not bound to any jQuery functions, as it was not around when the page loaded...

Beginning jQuery help

I'm trying to make a simple MySQL Admin thing with php and jQuery. I've never used jQuery so my code is probably quite lol-worthy. The problem I'm having with the code is that when I click the button, nothing happens. I know the even fires because if I open the html file in firefox (not going to the url, using the file:/// thing) and cli...