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/';
...
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
...
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
//};...
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...
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) ...
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...
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 ...
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...
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...
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...
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?
...
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...
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...
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 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...
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...
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...
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...
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...
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...