jquery

Jquery help needed - selecting a dom element right after creating it

Why is this piece of code not working on Chrome 4.0 but works on FF 3.5. The problem that occurs is the selector $('li#node-'+nodes[i].id +'').append function is not working in chrome but is working fine in firefox. Is there a problem with appending to DOM elements that have been created on runtime in Chrome? Should I use Jquery.live() ?...

JSTree Generating Links that are not usable in JSP page w/ Struts2

Hi, I have a tree generated with JSTree in my JSP page (part of a Struts2 webapp) as follows: <div class="panel"> <div id="demo1" class="demo"> <ul> <li id="node"><a href="#"><s:property value="product"/></a> <ul> <li id="node"> <a href="#">Dependents</a> <ul> <s:iterator value="dependentsList" id="dependent"> ...

SharePoint 2007 HttpHandler NullReferenceException using SPContext.Current.Site/Web when called from jQuery

I have the need to develop a custom HttpHandler in SharePoint. To start, I just coded up a simple example: http://pastebin.com/HXLjR2xT. On line 35 or 36 of that code I get a NullReferenceException thrown if I call my HttpHander page from jQuery. But if I call the page directly in my browser, I get the results I expect. I have seen some ...

how to get all data which stored in jquery.data() ..

this is the demo code: $(document).ready(function(){ $("button").click(function(e) { var value; switch ($("button").index(this)) { case 0 : value = $("div").data("blah"); break; case 1 : $("div").data("blah", "hello"); value = "Stored!"; break; ...

Send Ajax request from JqGrid ShowLink click

I need to load some dynamic html when a user click on a link in a jqGrid. here is my definition function loadUserAdministrationList() { jQuery("#userlist").jqGrid({ url: '/Administration/GetData/', datatype: 'json', mtype: 'GET', colNames: ['Username', 'Prénom', 'Nom', 'Courriel'], colModel:...

What's the simplest javascript function for requesting a .js file?

Hello, I was just wondering what the simplest javascript function would be to request a server side .js file. Currently I have a jquery-1.4.2.min file that weighs in at 70kb, and I figured that there has to be a way, using javascript, to request this file. That way, if the user doesn't have javascript enabled the function would be i...

Can I get an array with Jquery $.post?

I using jquery's $.post to pull information from a database dynamically. This works fine if I want one item however, I would like to store each column as an array and pass the whole array over. I have the array but am having issues pulling it back to javascript so I can use it. Since the array will contain text with commas I can't use ...

jquery hide objects if object class doesn't contain a value

Hi all, The title might be a bit confusing, basically I'm trying to write up a script which will grab the selected values from a drop down form, and hide li's if its class does not contain the values from the drop down form.. if that makes sense?? Each li has multiple classes.. Here's what I've got so far (sorry if it's crude): FORM:...

Why jQuery Form Plugin mixes the NULL and 0

Hello all, I am using jQuery Form Plugin http://jquery.malsup.com/form/ to submit my form. Here is the code that is used to submit the form. var options = { beforeSubmit: showRequest, // pre-submit callback success: showResponse, // post-submit callback url: 'recaptcha.php', // override for form's 'a...

Implementing dirty indicator for 3 different divs within an ASP.NET page

I have an ASP.NET page that has three divs within the only form which renders as three jQuery ui tabs. All the three tabs have inputs and/or selects that gets submitted to separate web methods. On tab one there are two inputs of type submit, that redirects after committing the form to another page. Simultaneous edits are possible on al...

jQuery / Javascript: fire a rightclick on a normal-click?

hey guys, i don't think so but i couldn't find a quick answer! is it possible to show the browsers rightclick (context) menu when clicking the left mouse trigger? thank you ...

I want to make a flowchart application in a browser. Which SVG Library to use?

As a fun project, I am going to make a simple flowchart app to learn some new html features, but I am unsure whether this is more appropriate for canvas or SVG (and which lib to use). I believe that SVG is more appropriate here since everything is basically shapes connected to lines (sounds like vector graphics to me), but if you think ...

jquery: can you do an ajax request in $(window).unload()?

I am absolutely terrible at logging my hours. So my idea is to have a browser shortcut that i open when i am starting work. Then when i am finished close it. This will then to an ajax request to a php script that will update my hours for me. To do this. Can i do an ajax request in $(window).unload()? or will the browser close before...

Image preloading: how much is too much?

So I have my own webpage here, which is a sortable thumbnails page. The load() event activates each thumbnail when the first related image is loaded. Since I'm grabbing <img> tags and text content from a hidden div on the page, the thumb activation prevents the user from clicking through to a yet-unloaded image and then waiting while the...

Click on word and get the definition...?

I am looking to have a user click on a word and a tip shows up above the word showing the definition. The definitions will come from a glossary of words we already have. We are using Ruby and Jquery for the site. Any suggestions or a finger pointing in a direction? ...

Loop through all IDs that begin with XXX

Would anyone know how to loop through all ID's that being with name_ So, for example, within the markup I may have 50 id's that all start with "name_", the full ID would be like name_2, name_55, name_25, etc. I'd like to loop through all of these getting the number. Not really sure where to begin....... thank you! ...

jQuery load() not working in Internet Explorer

I am trying to use jQuery load() function to get content from another page via AJAX. It works on Firefox, Google Chrome, but not in Internet Explorer 7 & 8. Here is the page I am developing: http://139.82.74.22/70anos/no-tempo All the jQuery code is working normally in Internet Explorer, but the specific part that should bring the dest...

jQuery - Why the validation rule doesn't support predefined value?

Hello all, I defined two jQuery validation functions as follows: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <title>Test</title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.m...

Ajaxify + Confirmation Dialog?

I'm using jQuery Ajaxify to ajaxify my forms. It has all the same callbacks as the standard $.ajax function. I'm trying to add in a standard Javascript confirm() dialog before the form gets submitted though. Problem is, as soon as you click the submit button, the ajax request goes through. How do I delay that until after the user makes a...

Jquery if anyone understand this url please explain me

Hi, im using jquery bind,detach etc etc but i found this link which is worth but i donno the exact thing in it http://tiny.cc/1sdz2 please anyone explain in detail about this. Thanks, Nithish ...