jquery

problems with ajax request in page with form. jquery

Hello, I'm making some things with jQuery ajax function, and I have a problem when I put a form in the middle of the html. In a nutshell: I have a dummy form that is controlled by the ajax, when it is submitted the ajax function complets the inputs below. The data submited by the ajax is contained in a form tag that is submitted when a b...

How to get difference of saved time and current time in jquery?

I want to get the time difference between saved time and current time in javascript or jquery. My saved time looks like Sun Oct 24 15:55:56 GMT+05:30 2010. The date format code in java looks like String newDate = "2010/10/24 15:55:56"; DateFormat format = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date = format.parse(newDate); ...

qTip jQuery version conflicts

Is it standard practice to hold an entire project at a certain release of jQuery until I can fix one measly bug? details: I'm using an older version of qTip because that is what works with jQuery 1.4.2 (the current release when I started the project). It's important to note that the release candidate of qTip does not work with the curr...

jQuery AJAX help.

Hi All. I am new here, and I have looked at the other Ajax Help topics, however, I still can't see why mine isn't working. Here it is: $(document).ready(function(){ $.ajax({ type: "GET", url: "localhost/val.php", data: "val=RichieC", success: function(msg){ alert("WOO"); } }...

Handling exceptions from a json request with ELMAH

Hi I am using ELMAH to handle expception in my MVC project. All is working fine, except for when the request is an ajax request. The exception is captured and logged but when I do a response.redirect to the error page, the redirect doesn't happen and the error message is displayed on the same page, overlapping the existing content. He...

How do I add a cancel button to my jqgrid?

I've got a jqgrid (version 3.5.3) on my site which gets its results from an ajax call to a web service. Often the query is complicated and it takes a few seconds to load the result. While it is loading the user sees a box [Loading...]. In case the users realise they're searching for the wrong thing, the client has asked to add a cancel...

How can alter the value of every single input element, by a fixed amount, without using a loop ?

I want select every inputbox of type text and transform by a fixed amount, when checkbox is checked, so far I have this. However I wondered if there was a way to do this without iterating over every element ... $("#myID").change(function(){ if($(this).is(':checked')){ //I can't do this : $("input:text"...

Patterns / strategies for creating a complex nested AJAX / jQuery form

We need to build quite a complicated form, which will allow creation / updating of multiple instances of entity A, where entity A can have multiple instances of entity B. Both types of entities are quite complicated (lots of fields and dropdowns) but only a few of these fields need filling in on creation. The requirement is to be able t...

can't get jQuery .load to load content into div

I have a list as such : <ul id="yearMenu"> <li>Select a year</li> <li><a href="AJAX/2010PR.html">2010</a> |</li> <li><a href="AJAX/2009PR.html">2009</a> |</li> <li><a href="AJAX/2008PR.html">2008</a> |</li> <li><a href="AJAX/2007PR.html">2007</a> |</li> <li><a href="AJAX/2006PR.html">2006</a> |</li> <li><a href="AJAX/2005P...

Registering JavaScript files and dependent inline code

I have two arrays. A list of urls to JavaScript files that I am registering with $.getScript(url); A list of inline JavaScript commands to register with $("html").append(inline) Any items in (2) may be dependant on any items in (1). Meaning that I have to be sure that all items in (1) have finished loading before any of (2) are regi...

Turning a text string of week numbers into array of values with jquery

Hi, I've been battling with this for a while: I've got a mysql database of events happening on various weeks. For each event there is a field with the week numbers that it is occurring as a text string. e.g. W01-W04, W06, W08, W10 How can i convert that that to an array of values with jquery? e.g. W01, W02, W03, W04 ect.. And then ...

Removing divs with jquery

Hi guys, I have been trying to apply the remove function to my html page but with no result until now. I have three rows and they all have a remove button, I would like to create an effect that when you click on the remove button the whole row block disappears. Any help would be deeply appreciated. HTML <div class="row ...

jquery click(function) onload

I need help to consolidate/minify the code below. Originally I had a dropdown which controls div's visibility based on value. It works onClick but since it's a database page, it doesn't work onLoad so I had to add a 2nd logic. Any suggestions/input is greatly appreciated. $(document).ready(function () { var $caseStatus = $(this).find(...

Dynamically change the size of a javascript/jquery dialog box to the size of an image

I have a javascript/jquery question. I have a custom jquery dialog box setup in my project. I set this up with a div and an image tag. The image is populated with a filedownload link. <'custom jquery dialog' runat="server" ID="dialogView" AutoOpen="false" CloseOnEscape="true" Modal="true" Title="" Visible="true" > <div runat="se...

jquery reading nested json

I have the following json as seen below. I'm trying to read the values TOP1, TOP2. I'm a little unsure of how to do this. I'm using the following .. But that just gets me an object which has the nested objects for TOP1 and TOP2. How do I get the values TOP1 and TOP2 ?? $.getJSON('http://localhost/data/menufixed.json', function(dat...

jquery effect for to simulate turning pages in a book

Looking for an effect similar to: http://issuu.com/nanomag/docs/nano_light ...

removing a cloned element

I have been trying to figure this out for a week now so I've come here. I have a function that I want to clone a list item after an image has been clicked and append the list item elsewhere... this is working, but i am having trouble doing the opposite... I have it wrapped in a toggle function but i can't seem to remove the appended clon...

Prepend Subfolder to All Links with jQuery

I am currently working on a site in a staging environment located at www.example.com/staging. All of the links for the site have been set relatively (ex: /about/). I am trying to write some simple jQuery to add "/staging" to every link on the pages, so I don't have to change all the links for the week or so it is in the staging environme...

Why does php insert backslash while replacing double quotes

I'm wondering why php adds a backslash when i remove double quotes. <input type="text" name="number" id="number" /> <input type="button" name="button" id="button" value="Button" /> Say they user enters the value 5-1/2" and i'm passing it to a processing page via jquery's .get method. $('#button').click(function(){ $.get('determi...

Is it possible to use Closure Compiler ADVANCED_OPTIMIZATIONS with jQuery?

I keep getting errors that the function (renamed) does not exist for the given object. Is there a release or setting or something to make it work? ...