jquery

What are some key gotchas when working with Json responses?

I'm working on an ASP.Net MVC project and have been learning a few little tricks with JSON objects that made me scratch my head for quite a while. For example, ensuring that when I call $.getJSON() from jQuery, I actually need to make sure my JSON is returning an object, not just a string value (well, D'uh! right?). What are some of th...

Jquery find an element by the value of its name? (name=val)

I know how to find an object by .classname and by elementname and i think by #idname but how do i find by the value of its name? ...

Form content changes identifier using jquery?

Is there is any jquery plugin or utility which identify the changes happen in form / document. ? i.e. Preious content and after contents Please help ...

How to add and repeat title="some text" same as alt="some text" if title is already not present?

I want to add and repeat title="some text" same as alt="some text" if title is already not present. To show Alt text in FF also. before alt="some text" alt="some text" title="some another text" After alt="some text" title="some text" alt="some text" title="some another text" **I need * jquery(with no conflict) or simple javas...

How do i handle ajax and closing pages.

If the user happens to have a delay in connecting to my site, the ajax hasnt timed out and the user decides to close the window. The ajax query will be terminated? Is there a way i can say still processing are you close you want to leave this page? (bonus if it will close once ajax was successful). How do i do this? I am not sure if thi...

asp.net gridview jquery contextmenu

I'm trying to display a context menu for each row in the gridview. The context menu needs to pass specific variables for each row, for example, a unique userid. I would like the ul to only be on the page once I have passed variables or something <ul id="myMenu" class="contextMenu"> <script src="scripts/jquery-1.3.2.js" type="text/...

Can I wait for $.get() call before submitting the form?

I have a sign-up form which prompts for the first name, last name, username, password and e-mail address. I'm using two separate $.get() methods to check if the username and e-mail address are not existing. This is my function: function validateSignUp() { var firstName = $("#first-name").val(); var lastName = $("#la...

How to submit info from 2 submit button but from one button through jquery?

I have 2 SUBMIT button in a form one is display:hidden and one is display:block if user click on SUBMIT button (display:block) then another SUBMIT button {display:hidden} should also submitted. Is it possible with jquery? ...

how to show a modal Loading ... while a ajax request $.get/$.post is running ?

I have a web application in asp.net, mvc and sometimes my ajax request might take more than 1 second. So I need to show a big div over the entire page (Loading...) while this request is working and to hide it when it's finished. Does anybody know how to do this ? ...

Ajax Form submittion in Google App Engine with jQuery

could not figure out why it is not working: i need to send request to server, generate some fragment of html in python with meanCal method, and then want that fragment embedded into submitting html file using calculation method and dynamically shows in dyContent div. all the processes are done by single click on submit button in a form...

reload a table after link click to update results

Hello, I am have a table that shows the user suggestions that they have recieved on clicking read more some ajax is fired and in the database the suggestion is marked as read. Currently if the suggestion is new I show a closed envelope, if it is read I show an open envelope, however I can get it to reload the table when the user clicks...

jQuery find if a dynamic generated <p> have text

I try to find if a dynamic created <p> have text. '.layer'+count returns my class but I can not get it to work with .lenght. if ( ($('.layer'+count).text()).length > 0 ){ alert ('I have text') } Any tips on making this work? Thanx ...

jQUery equal columns change by row

Hello, I use this jQuery function to make the <li> have equal heights. function equalHeight(group) { var tallest = 0; group.each(function(index) { var thisHeight = $(this).height(); if(thisHeight > tallest) { tallest = thisHeight; } }); group.height(tallest); } My problem is that they take the height of the tallest one. ...

jQuery and asp.net webservice not working

Im trying to call a asp.net webservice from jQuery but I get the telling me that i need to set the System.Web.Script.Services.ScriptService(). The only problem is that i have set this in the webservice and it still complains? The jQuery uses POST and application/json and iv inlcuded HttpPost and get in my web.config. What can the proble...

Zend Framework - JQuery - Date Picker - Format Date to YYYY-mm-dd

Hi, Im using a JQuery DatePicker in a Zend Framework based application Form. Here is the code for the date picker $this->addElement('datePicker','movie_release_date', array( 'label' => 'Release Date:', 'required'=> false ) ); By default, when you pick the date, it is stored in the text input li...

help: when calling a javascript functions, it's interrupted by jquery's onready method!

wow! i just noticed something, every time i try to call a function, no matter what function, in javascript, somehow jquery and ms ajax framework javascript captures it and checks if the document is ready (document.onready or other) and never returns the control back to the function im calling, or whatever it does, my function never ends ...

jQuery set Hash value

Prototype version var hash = new Hash(); hash.set("date_query", "test"); hash.set("date_search", "1"); Jquery? ...

Selecting all the divs with png background-image

How can i select in jQuery all the divs that have background-image: Url('somepath/somename.png'); in their style? Thanks. ...

How do I pass a variable into a jQuery query?

For some reason, this works: var oldText = $("#tayke li:eq(" + theIndex + ")" ).text(); But this doesn't: var tayke_li = "#tayke li:eq(" + theIndex + ")" var oldTest = $( tayke_li ).text(); Note: theIndex is an integer. ...

Auto-Scroll in FireFox

My application is a Live chat. I have a Div to wrap the messages, each message is a div, so, after a few messages my DOM looks like this : <div id = "divChatHistory"> <div id = "msg1> Message number one </div> <div id = "msg2> Message number two </div> <div id = "msg3> Message number three </div> // ... </div> Now a need t...