I have gone insane trying to figure out how to make this work. Code looks roughly like:
function onDropDownChanged() {
$("#updatePanel").load(
"myUrl",
{ id: $("#myDropDown option:selected").val() },
onPanelLoaded
);
}
function onPanelLoaded() {
$("#theTextInput").focus();
}
$(document).ready(function() {
$("#myDropD...
I currently am working on a little app that requests user info from my server and displays them using a special template.
At first, I just hardcoded the little snippet in jQuery:
$("<li><div class='outer'><table><tr><td rowspan=2 class='imgcontainer'><img class='thumb'/></td><td><span class='username'/></td></tr><tr><td><span class='n...
Hi,
I've been programming in PHP for some time now, and id like to start learning how to create more dynamic websites using AJAX.
The question is - where do I start? Heres' what I'm considering:
prototype + script.aculo.us
dojo (with/without Zend Framework)
jquery
What book should I buy? Are these different libraries, or the same?...
Say I have a draggable with width 2x that needs to be dropped on an area with width 3x, either at the leftmost or rightmost end (leaving a gap of x on the other side). So for instance I have a draggable div that is being dropped on a tr with three child tds, and can either be dropped simultaneously on the 1st and 2nd td, or 2nd and 3rd t...
Is there any JavaScript function that can unify $ function from both Prototype and jQuery?
Yes, this is the real use case I am facing now. I find $ function in Prototype and $ in jQuery is conflicting each other. I know that we could us jQuery.noConflict() to ressign $ back to Prototype, however by doing so, I will have to rewrite jqu...
When I start to learn a new language, I always feel like I'm not doing it the practical, standard way. So here's a question regarding jQuery and if what I'm doing is acceptable.
I have 3 images.
<img src="del.png" class="delete user" />
<img src="del.png" class="delete event" />
<img src="del.png" class="delete recipe" />
Then I have...
The solution to this question suggested the use of John Resig's class implementation. This solution covers all my needs except:
How to declare a public global variable inside this class that can be accessed from outside?
I would like to establish something like the following:
var MyClass = Class.extend({
EVENT_NAME : 'eve...
Is it possible to see what items/elements I have selected in a particular jquery selection?
I saw someone demoing jquery and they used some form of console that returned an array of items for every selection, they could then mouseover each item and it would highlight it in the browser.
Im currently using alert($('div').length); to see...
I am using jQuery and AJAX. When clicking the Hyperlink, the associated document to be loaded in Popup Menu works fine. The problem comes when I use AJAX.
My Code:
//index.html
....
jQuery.ajax({
type:'POST',
url:' my.php',
data:'one='+one,
success: function(data){
jQuery("#another").l...
Is it possible in jqGrid(jquery grid http://www.trirand.com/blog/) to have custom cell text colors e.g. in price column i want red if price > 100$ and green if price < 50$ else grey?
More generally do
jqGrid provides hooks to change grid cellview, e.g. i can register a callback whenver cells of price column are created or modified.
o...
I have a javascript function that calls a generic function to make an ajax call to the server. I need to retrieve a result (true/false) from the callback function of the ajax call, but the result I get is always 'undefined'.
A super-simplified version of the generic function without all my logic would be:
function CallServer(urlContro...
I am currently using a javascript code to make an entire row in my table clickable. Once the row is clicked a function is ran, I am wondering what I can use to redirect to a PHP page and preferably send a post variable along with it. My guess is AJAX but I am not sure how or if it would work.
My Javascript Function:
function DoNav(t...
I have an application that allows a user to view details on a specific case w/out a postback. Each time a user requests data from the server I pull down the following markup.
<form name="frmAJAX" method="post" action="Default.aspx?id=123456" id="frmAJAX">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" />
</div>
<div>
<i...
Hello,
I want to select every textarea that does not have a DIV with class red among its parents, do something to each, and then do something else with the rest of textareas on the page. In other words, select a set of elements, work on only some of them, and then do something else with the rest.
I know I can do something like below, b...
$(document).ready(function(){
// Hide all large images except the first one
$('#imageContainer img').hide().filter(':first').show();
// Select all thumb links
$('#thumbContainer a').hover(function(event) {
// Hide all large images except for the one with the same hash as our thumb link
...
Hi,
I have jquery code that is being reused by a repeatable partial view on an asp.net mvc page but the script is not executing as I expect it should.
The scenario is not that complex, I have a page with multiple reviews for an item, and users who are logged in are allowed to 'vote up' or 'vote down' a review via a thumbs up/thumbs down...
Hi,
I need to show a div over the some items in a sortable list.
This div shows information and needs to be use as handle for the sortable item.
The problem is that this div is located outside the items (at the end of the body), and since sortable handle option only looks for child elements (because it uses a .find() to look for) it's ...
I currently have a 2 column site layout, with a footer/header, a fixed width left column which contains a menu, and a right hand column which takes the rest of the available space. My lefthand column contains a fold out menu, and it seems that when I have tabs in the right hand column, the text within the selected tab only begins after ...
Duplicate:
What are some of the pros and cons of using jQuery?
Should I avoid using a JavaScript library while learning how to write AJAX client code?
I've read it so many times... "I'd learn JavaScript before learning something like jQuery" - but is this really necessary for every situation? Sure, some people like to kno...
I have a form which is a simple CRUD.
I am trying to display a cool looking success message when user enters or deletes a record. I've seen this a lot around the web.
I am very new to jquery. does anyone know any examples that would show how to do this?
Basically a div that would slowly dim out.
...