jquery

Rails & jQuery - getting UnknownAction error when checking username availability

Hi - I'm trying to write a small jQuery method that works on my rails site and check if a username is available. This is all handled in the users_controller.rb and on the form: <script> $( function() { $('input#username').keyup( function() { var username = $('input#username').val(); url = '/users/check_username/'; ...

jQuery XML export or Simple JavaScript file download

Hi, I have dynamically created a xml string form a JSON object returned from server. I need to give the user to download this as a file so that when the user click the button named export he/she receives a downloadable.xml file and can be save d on local machine. Is this possible? -- Mithun Sreedharan ...

Using Jquery each loop to display six list items per ul inside a div pulled from a JSON object

Hello all! I am running into problems where I can't seem to display six list items within a ul that is nested within a div. The following is what I have so far: $(function proName(){ $.getJSON("pros", function(data) { /* Parse JSON objects */ jJSON["pro_name"] = (function() { //response = { //values: [], //count: 0 //};...

Report user errors in jQGrid

I have a jqgrid table querying a MySQL DBMS through an apache2 web server via XML. Sometimes whenever the DB server shuts down or the server side program encounters some kind of crashes the jqgrid just freezes down waiting for the XML data to arrive. In this kind of situation, I would be preferable to make the jqgrid user aware of thi...

In a jQuery AJAX post, is it possible for the data payload not to be sent?

I have a problem where sometimes the data payload in the AJAX code below is not sent to the server. // loans_url, sample_id, sample defined above this block $.ajax({ type: "POST", url: loans_url, data: {'loan[sample_id]':sample_id}, beforeSend: function() { sample.remove(); }, success: function(data) ...

Coda-Slider Previous and Next Button Hiding

Pretty simple question, I know it's just a matter of if / else if statements but I'm unable to get them to run correctly. I'm using the basis of http://jqueryfordesigners.com/coda-slider-effect/, I can get them hidden, etc, but when it comes to having them available depending on the situation (what is currently selected) I'm just unable...

AJAX popup control extender - how do I put on a Cancel button?

Normally with an AJAX popup control extender, you simply select the item and your selection will populate the associated control. However if I want to populate the control either directly or by a drop down list, then I would like to have a submit button and a cancel button. I have found how to put in a Submit button. But how do I put in ...

window.parent jQuery selector not working in IE8

this code bellow works fine $('html').bind('mousewheel', function(event, delta) { window.parent.scrollBy(-120 * delta,0); return false; }); but this one doesn't, can anyone tell me why. I'd love to know. $(window.parent).bind('mousewheel', function(event, delta) { window.parent.scrollBy(-120 * de...

JQuery code not working

Why is the following code giving an exception? function SetText(index, text) { try { $('p')[index].innerHTML = text; } catch (ex) { alert(ex); } } $(document).ready(SetText(2, 'Damn')); the exception is: TypeError: $('p')[index] is undefi...

Don't get value when refreshing the page in jquery

When I click on link the value displayed correctly.But when I refresh the page i don't get this value. I have written below code $j("#add_to_cart_action").click(function(e) { $j.em.cart.addSelectedTitle(); }); $j.em.cart.addSelectedTitle = function() { var addcartitemindx = $j("body").data("selected_title").product_id; v...

how to make the Textbox to allow only three digits with three decimal points?

I want to make the textbox allow only three digits and three decimals.For example 999.999.similarly it doesnt allow any characters like a,b,/,etc.How can I do with the Jquery? ...

How to set cookie in jquery?

I want to set cookie so that i get the value after refreshing the page. I have written below code But i am not able to set the cookie. $j("#add_to_cart_action").click(function(e) { $j.em.cart.addSelectedTitle(); }); $j.em.cart.addSelectedTitle = function() { var addcartitemindx = $j("body").data("selected_title").product_i...

How to create object masker (div covers all surface current control) by using jQuery?

I need some function in jQuery like the following code. The createmask function must create div that covers all surface of current object. Moreover, this function need to support a lot of position style of current control like static, absolute, fixed and so on. $('sometextbox').createmask() For more information, Please look at the bel...

Change an input field before submit

I have to encode a domain name (IDNA) for a particular registrar using accents. I have a simple input field : <input type="text" id="idndomain" name="sld[0]" size="40" /> My jQuery function $(document).ready(function() { $('#domainform').submit(function(){ $.getJSON("includes/idna/idna.php", { domain: $("input#idndomain").val...

Visual jQuery for jQuery 1.3.2

Visual jQuery website, which is originally created by Yehuda Katz & updated by Remy Sharp, is very helpful & interactive to explore jQuery API. I'm using this website a lot more than jQuery documentation website I'm still waiting for someone to update the website since it still demonstrate jQuery 1.2.6. Anyone you know some website sim...

How do i add and remove an active class with jQuery?

I have an unordered list. <style> #button1 { position:relative; z-index: 3; } #button2 { position:relative; z-index: 2; } #button3 { position:relative; z-index: 1; } </style> <ul> <li id="button1">Button 1</li> <li id="button2">Button 2</li> <li id="button3">Button 3</li> </ul> I am currently using css to give each id a d...

Show box on textbox focus, wrapping the textbox

Hey. Actually it's a lot easier to show you what I want to achieve instead of trying to explain. State 1: http://i38.tinypic.com/2i04135.png The field Responsibles hos no focus. Pretty simple. State 2: http://i36.tinypic.com/1zwjm3c.png The field Responsibles got focus. A div shows up around the textbox and the text. It's no proble...

Force jQuery-autocomplete (From Array, Modified version) to show the suggestions even if nothing is typed

Hi, I have this version of jQuery-autocomplete: jQuery Autocomplete Mod, It's cool with me till the moment But I'd like to get slight customization of it: I want onclick a list appears holding all of the possible suggestions! even if there is nothing in the input box Somethings you should know: I have a problem with the 'Traditional...

jqtransform and collapsed DIV

Hello, I am using a jQuery plugin called: jqtransform This plugin uses JavaScript to apply CSS styles to form elements. The problem that I have consists in the following scenario: I’m building a search page, with a advanced search option. When the page loads, the div called “advancedSearch” is hidden, and it will only show if the use...

JQuery, new JS function syntax

Can someone explain me the syntax below line 1? I am OK with js and function references, but this code looks a bit confusing. E.g. is it function declaration and execution? jQuery.noConflict(); (function($) { $(function() { // more code using $ as alias to jQuery }); })(jQuery); // other code using $ as an alias to the other li...