jquery

Add/remove items to/from an HTML select list using jQuery

Could somebody recommend some of the best strategies they've used to populate items in an HTML select list on the client side? I'm using an ASP.NET MVC application and making use of jQuery. The select list in question is simply a collection of strings which will need to be saved with the model. I'd rather not have a server call for ev...

Securing JSON with a codeigniter and jQuery project.

I would like to use JSON, however, the security issues related to using JSON are holding me back. There are two main issues CSRF (Cross Site Request Forgery) and the JSON/Array hack. I have read that Double Submit the Cookie expanding from Secret Hidden Fields are possible solutions to the CSRF problem. I wonder if there are any co...

jquery form plugin, no error handling

Hi, It seems that there are no error handling facility in the Jquery.Form plugin, which is very frustrating. Even though the documentation says we can use the $.ajax options, I still cannot make use of the 'error' option when the server returns an error, especially the 500 and 400 series. Is it that this plugin cannot handle any error a...

jQuery select dropdown and selectedq

Hi, var colorID = 3; $('#color').each(function(){ if($('#color').val() == colorID ) $('#color').attr('selected'); }); Why doesn't this work? My html <select id="color"><option value="">Select Color</option> <option value="1">Red</option> <option value="2">Blue</option> <option value="3">Black</option> <option value...

Why jquery datapicker inconsistently shows up?

Here is my problem. It seems that datapicker does not show up when clicked the first time on the dynamically added input (I have to click two or more times on it or best if I click above the input (label area)), does anyone see the problem. I tried a lot of live(), bind() .hasDatapicker and #datep1 variants. If possible test your answer ...

'myFunction is not a function', JS & Google Maps v 3?

Hello I cannot figure out why I get this error. I've got a list with inputs which values contain lat/long/name/address. Printing the markers on the map works fine, using the infowin workED fine, till I realized that it only openend the same info in all windows. Soo, obviously I needed to attach this (the marker i just clicked) to the ...

another way to send data to view from controller action rather than json in "this" situation.

Hi, I am developing the full calender of jquery from some blog. I added my questions with concern this, but this question bit different. Full description of code is given here But not get satisfactory answers, so need to change the strategy . in this (in link given) code , action of controller returns the Json output and j query accepts ...

How to avoid refresh in AJAX?

Hi, I have a client and a server written in CGI(c++), as JS model is like to ask something from server, there is no mechanism for server to send async message. So this means the client needs to poll server periodically? I read BOSH protocol, it says to achieve the async for http, a web page can issue several HTTP request, but the server...

Clickable parent DIV to show and hide children DIV has problems in jQuery

This is kind of crazy and I am not sure what's wrong. I want to make a DIV clickable to show/hide children divs. But once I do a hide of one children, I cannot unhide it. Here's my entire code. Any help appreciated. IN example below, I cannot unhide inner1 when clicking Cancel button. <script type="text/javascript" src="http://ajax.go...

jQuery:modal-dialog with if else

dear all, i need to combine two different result in one script. The problem is like this: if #edit clicked -> show dialog -> click button #ok inside dialog, then do function: if($('#user').val() !== "admin" || $('#password').val() !== "qaubuntu") { alert('Invalid login'); return false; ...

Looking for a WYSIWYG web editor

I am looking for a WYSIWYG editor for my intranet users. It should not show or give them a html option, instead it should have buttons for stuff like bold, italic, bullets, comments, font colour, html links, etc etc. Which WYSIWYG editor would be best for these needs? ...

Spot the ball game, zooming problems, jQuery

I am trying to create a spot the ball game, so it will (eventually) be an image of a player kicking a ball but the ball has been removed and the player needs to click where the ball should be. The first version went well and works. http://enjoythespace.com/sites/game/test.html But what I need to add is some sort of zooming so you can ...

jquery datepicker minDate specific day in current month

H I need to customize two datepickers. First shold have: minDate: last ten days of this month (or if easier: 20th of this month) maxDate: 10th of next month I can only set then as given in "manual" like this: +1m +2w +5d. But that is not good in my case since I do not need to go relative to current data. Any idea? I have tried th...

[jQuery] .hover not working in IE8

Hi, I have this css code that works fine in Chrome and Firefox but not in IE8: <script type="text/javascript"> $(function(){ $("#button").button(); $("#radioset").buttonset(); $('#ciao,#dialog_link, ul#icons li ').hover( function() { $(this).addClass('ui-state-hover ui-corner-left '); }, function() { $...

Dont get content in IE xml/jquery

The trouble is that everything works fine on every browser except IE. I get content from xml and I am able to print it, but on IE it gives empty. After some googling the problem might be width this header("content-type:application/xml;charset=utf-8"); Where am I suppoesed to put that? On the xml file start or? Thanks. ...

Making a jQuery droppable accept items from a sortable which is using connectWith

I've got a sortable list which is using connectWith to ensure it can only be sorted within its own types of list. Now I'm trying to make a droppable trash can element that appears at the bottom on the viewport when an item is being sorted. This element is outside the context of the lists and simply deletes any element that is dropped o...

BlockUI bad performance

I am having serious performance issues with BlockUI and ASP.NET AJAX on my aspx page. I am trying simple element blocking but it is fading in with a a lag/delay. Does html errors on page would impact blockUI ? I might have some on my page. I am blocking a large div spanning well above the browser vertically. Also, the unblock works great...

jQuery Right-Click Context Menu Help!

http://pastebin.com/YyDzQ4Bk this is a plugin for right click context menu, anyone know why it doesn't work in IE? Not only that, it's breaking many of my other jQuery things, such as fancy box and some jQuery hover functions. ...

jQuery script working after the DOM has loaded within a .click event?

Hi, I am trying to find out how to get a jQuery script to work correctly when a click event is started, the script calculates the height of a container (this script appears at the start of the page on load and works 100%) but I am now trying to get it to work inside a .click event. If anyone knows how I should achieve this I would be ve...

jQuery + swfupload: z-index problem

hi, i'm using jquery + swfupload - the problem: when displaying a jQuery dialog, the swfupload-button always is on top and is overlapping the dialog window. i've already tried increasing the z-index of the dialog but didn't help. any ideas how to fix it? thx ...