jquery

Jquery: change event not triggered in IE

Hi, I have some code updating a dropdownlist, and then I fire the "change" event manually. It works like it should in firefox, opera and so on, but not in Internet Explorer. Any idea why? Code attached below. $(".bringFraktvalgRadio").click(function() { var selectedValue = $(".bringFraktvalgRadio:checked").val(); $("#<%= dro...

Post data with jQuery to ASP.net, am I doing this secure enough?

For a website I am building, I am using jQuery to post data to Generic Handlers I created for this purpose. Because you need to be logged in, to do most post actions (like 'rate a picture'), I am currently using the following technique: User visits page Page determines if user is logged in On Page_Load the page fills a hidden field wi...

Asynchronous Controller is blocking requests in ASP.NET MVC through jQuery

I have just started using the AsyncController in my project to take care of some long-running reports. Seemed ideal at the time since I could kick off the report and then perform a few other actions while waiting for it to come back and populate elements on the screen. My controller looks a bit like this. I tried to use a thread to perf...

Fullcalendar limit the display of available months?

Hi, I would like to find out how can I limit the fullcalendar to show a three months period and deselectable for the rest of the months like within a datepicker? E.g. The current month is May 2010, I would only like the calendar to show May and Apr (on clicking of previous month), and Jun (on clicking on next month), the rest of the m...

jQuery ajax post dynamic url insertion

$.ajax({ type: "POST", url: "OMFG.php", data: info, success: function(){ }}); is what I'm using atm as a test and it works fine. I need to get the url from the link I'm clicking, so I do: var url = $(this).attr("href"); which works fine if I alert it out(the link includes http://samedomain.com/etc.php), but the ajax function doesn...

post values to external page explicitly PHP

Hi, I want to post values to a page through a hyperlink in another page. Is it possible to do that? Let's say I have a page results.php which has the starting line, <?php if(isset($_POST['posted_value'])) { echo "expected value"; // do something with the data } else { echo "no the value expected"; } If from another page say link....

Client side validation script dissapears with $.ajax()

In my javascript file I'm getting the content of a partial with the following call: $.ajax({ type: "GET", url: value.href.replace(actionType, actionType + 'Partial'), dataType: "html", success: function(result) { $("#DepartmentsAction").html(result); alert(result); } }); Because the partial has the call Html.EnableCl...

Binding mousemove within mousedown function with jQuery

I am trying to bind a mousemove event to a div when the left mousebutton is down, and unbind when it is released. This code should be fairly self-explainatory. function handleMouseDown(e, sbar){ if (e.button == 0){ console.log(sbar); //firebug sbar.bind('mousemove', function(event){ handleMouseMove(event,...

Programming a callback function within a jQuery plugin

I'm writing a jQuery plug-in so I can reuse this code in many places as it is a very well used piece of code, the code itself adds a new line to a table which has been cloned from a hidden row, it continues to perform a load of manipulations on the new row. I'm currently referencing it like this: $(".abc .grid").grid(); But I want to...

Best solution to wait for all ajax callbacks to be executed

Hi! Imagine we have to sources to be requested by ajax. I want to perform some actions when all callbacks are triggered. How this can be done besides this approach: (function($){ var sources = ['http://source1.com', 'http://source2.com'], guard = 0, someHandler = function() { if (guard != sources.length) { return; } //d...

Organization of the jQuery Object

I was going through the source code of jQuery. I'm having trouble understanding the wrapping strategy for the jQuery object. (function( window, undefined ) { // Define a local copy of jQuery var jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' ...

Jquery current menu

Hello I have: var href = window.location.href; if(href.search('/welcome\\/') > 0) { $('.menuwelcome').css('display', 'block'); $('#welcome2').append('<b>Приглашаем субагентов</b>').find('a').remove(); $('#welcome2').find('img').attr('src', '/static/images/arrow_black....

Fixing Django Admin collapse error.

Hi. I've been following the Django tutorial, and so far everything's been working as planned. Except "collapse"ing. On my admin page, I get the error in my Javascript Console: Uncaught TypeError: Object #<an Object> has no method 'first' collapse.min.js:1 I'm assuming this is a bug in jQuery, or the collapse script, however my qu...

Jquery- Hide div

I have a div inside form something like <form> <div> showing some information here </div> <div id="idshow" style="display:none"> information here </div> </form> i am population information inside div(idshow) on some button click event. what i want whenever i ill click outside div(idshow), it should be hide. just like i click on menu...

JQuery, Selecting every img in the n'th div with a specific class

Something like $('.mydiv' :eq(n) 'img') but yeah that is a terrible way of writing it ah, help? ...

How to filter the jqGrid data NOT using the built in search/filter box

I want users to be able to filter grid data without using the intrinsic search box. I have created two input fields for date (from and to) and now need to tell the grid to adopt this as its filter and then to request new data. Forging a server request for grid data (bypassing the grid) and setting the grid's data to be the response dat...

Cannot access objects in associative arrays using jQuery

I am trying to create and array of objects so that I can access them in a for loop in jQuery and I know that this works in Actionscript so what I am trying to do is convert my current knowledge to jQuery that will work. Please have a look at this and tell me why I cannot access divToShow Thanks guys var homeImages = new Array(); homeI...

jQuery crashing Internet Explorer

Hello. Okay basically, I'm designing and developing a fairly complicated website which revolves around the use of jQuery.. My knowlege of jQuery is really poor and this is the first time I've properly used it. I posted a question here before about the script and apparently its awful, but I didn't show you exactly what I was actually wri...

JavaScript Drag and Drop Grid With Elements of Different Sizes.

I need to be able to drag and drop boxes of differing dimensions on the same grid. JQuery UI seems to offer 80% of what I'm after particularly the sortable grid the have on their demo page. The only problem is that this grid only works with boxes of identical dimensions. My requirement is to be able to have the same functionality but ...

JQuery noob: Show div on hover, click to toggle display..

Hi, been playing with this for a few hours and can't figure it out. jsFiddle example here. Basically I want this to show on hover, and click it to toggle whether it is displayed or not. I thought this was the way to do it with display:block;, but I can't get it to work. Thanks for any help. ...