jquery

Why doesn't this event unbind using jQuery?

I have seen similar questions but I can't figure out what I am doing wrong here. The dropdown is shown after an ajax call completes succesfully then I want to hide it when a user clicks anywhere. I would like to remove the event though because there is no need to hide it if it is already hidden. dropDown.slideDown('fast'); ...

jQuery count how many divs with a class there are and put into string

Is there a way in jQuery to count how many divs you have and put that number into a string <div class="name">SOME TEXT</div> <div class="name">SOME OTHER TEXT</div> <div class="different">DIFFERENT TEXT</div> So count the divs with class name and then put that into a string so the output would be this var strNoDivs = 2 Any ideas...

How can I use jQuery Ajax and PageMethods with instance variables?

One reason we currently use UpdatePanels for doing our AJAX is because our BL and DA layers pass around the Page.User.Identity for authentication. Is there a way to access this? ...

how to avoid repetition of data for a repeated dropdownlist input?

I have a webpage that should be relatively lightweight, the problem is that i've got a table with editable user data on each line and the data includes a dropdownlist with hundreds of options. i've argued against the use of so much values but i guess i wasn't able to come up with a satisfying solution; so the ginormous dropdownlist stu...

Has anyone used CeeBox and how it compares to colorbox or other lightbox clones?

All, Someone introduced me to CeeBox http://catcubed.com/2008/12/23/ceebox-a-thickboxvideobox-mashup/ and I'm just wondering if anyone knows of any sites out in the wild that use this plug-in? Also, I would like to know if anyone has any opinions on this plug-in or other lightbox clones (i.e., colorbox)? It seems that we now have a pl...

jQuery .html().length not returning correct value

I'm trying to 1) remove default text in a textarea when a user focuses on it. 2) if he doesn't enter anything and clicks away, the default text should be reinserted. My code below handles case #1, but fails case #2 in Chrome and Safari (but not Firefox). When I enter in text (so $(this).html().length > 0) and then click away, jQuery in...

jquery autocomplete plugin - options list won't close after it's been scrolled - Chrome only

Hi all. I'm using the jquery autocomplete plugin (http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/) and it's fine in firefox but i'm having a problem in chrome. The list of options that appears is longer than can be displayed at once so has a scrollbar down the side. Once you have scrolled the list with the scrollbar, ...

Jquery: Automate Mousemove every 20seconds

Dear All Coders, I would like make a script in Jquery that automove my cursor every 20 seconds in a random position of screen. If is not possible to make in Jquery,how i can make it in Javascript? Thanks in advance. Kind regards. ...

Loading SVG into SVGWeb dynamically with JQuery

Hello, I am trying to dynamically display some SVG content. This content is stored as a string in my data source. An example string would look like the following: <svg width="200" height="200" style="background-color:#D2B48C; margin-bottom:5px;" id="embeddedSVG"> <g id="myGroup" fill="blue" style="font-size:18px; text-anchor:middle; fo...

jqGrid multiselect is very slow with large local data and jQueryUI 1.8, jQueryUI 1.7 is fine

I am using jqGrid in an ASP.NET page and injecting the datainto a script block on the page and then loading from there. For this one use case it is necessary that we have a large amount of data visible on the screen at once. which involves 300~500 records with 30 columns on each row. Paging for this case is not a good fit. The user needs...

MVC, WCF ASP.NET 4.0 & JQUERY

Hello, I've spent the past few days getting frustrated with WCF, so I've decided to post for help on here because.. well.. I don't have a clue where to start!.. any help would be appreciated! Firstly: When creating a WCF Service in .Net 4.0, which template should I use if I want to be able to create a service that will accept data from...

add commas to a number in jQuery

I have these numbers 10999 and 8094 and 456 And all i want to do is add a comma in the right place if it needs it so it looks like this 10,999 and 8,094 and 456 These are all within a p tag like this <p class="points">10999</p> etc. Can it be done? I've attempted it here with the help of other posts http://jsfiddle.net/pdWTU/1/ but...

Retrieve plain text with jquery ajax and convert to JSON

Update: the following works fine in IE8, but data comes back null in firefox: $.getJSON('myUrl/solr/select/?q=citystate%3ASea*&version=2.2&start=0&rows=3&indent=on&wt=json&fl=citystate', function(data) { alert(data.response.docs[0].citystate); }); I have a jetty server that generates json data as plain text - here are what the heade...

Its not validating on my submit button click using javascript

Hello friends, I have this code in my view function Validate() { if (document.getElementById('MandateName').value == "") { var err = document.getElementById('MandateNameErr'); err.innerHTML = "Please enter a value for the Mandate Name"; err.style.display = "block"; return false; } else { docu...

Safari for iPhone can't evaluate correctly jQuery ?!

Hi everybody, I'm trying to make work a functionality that exists on my website but works bad on Safari for iPhone. Well, I have a "li" element: .. <li><input id='showOrHide' type='button' value='show or hide'/></li> <li><input type='text' value='ok'/></li> .. When I click on the 'show or hide' button, the text input should ...

How do I catch Javascript functions that are being called?

I'm working with COGNOS, a very frustrating BI application that relies heavily on Javascript. Basically, when a <select> box is changed, the data on screen is refreshed, presumably by an AJAX function or something similar. I'd like to force this change using jQuery, but I'm not sure how to intercept the call it is making so I can duplica...

jqPlot in facebox popup

I'm simply trying to show a jqPlot in a facebox modal popup window. The plot shows fine in the div on the page, but if I try to set display:none; and show the div in a facebox popup, I get nothing. I'm sure it's to do with the canvas renderer and the events sequence, but I can't get it to work. Has anyone else tried this? ...

question regarding serializeArray and passing into url

Hi, I am not totally familiar with javascript, jquery. I am trying to do the following. Note a-f are names for the dropdown menus. Can someone help clarify? thanks var a_params = $("#a").serializeArray(); var b_params = $("#b").serializeArray(); var c_params = $("#c").serializeArray(); var d_params = $("#d").serial...

Editing results while being appended?

I have the following script which displays data returned from a serverside page onto the clientside page: function getResults() { var search; search = $(".txtSearch").val(); $.ajax({ url: 'search.aspx', type: 'POST', data: { strPhrase:search }, error: function(xhr, status, error) su...

Disabling submit button stops form from being submitted PHP / Javascript

I think I got a classic problem but I was not able to find a working solution so far. I have got a form , the user clicks "Send" and everything works fine using a PRG pattern and doing both client-side and server-side validation. The problem arises when any user (let's assume he entered valid inputs) clicks more then once quickly befor...