[jQuery] How to cancel an AJAX request?
Hello,<div> </div><div>Is there a way to stop or cancel an ajax request on demand, similar to pressing "stop" in the browser? I would like to provide the user with a cancel button on a "loading" dialog that, when clicked, closes the dialog and cancels the ajax request. I have the dialog working (thanks to jQuery-UI) but pressing cancel only closes the it.</div> <div> </div><div>I do not want simply ignore the response because I have a "success" callback that does some heavy manipulation of the response
[jQuery] Hover Area -> Change image
What I want to have happen is when you hover over the li it: 1) allows you to click the who area (this works) 2) The image swap. Right now the image will only swap when hovering over the image not the rest of the li. Any help would be appreciated! $(document).ready(function(){ $('li.clickable').css('cursor', 'pointer').click(function() { window.location = $('a', this).attr('href'); }); $("li.clickable img").hover(function() { $(this).attr("src", $(this).attr("src").split("_off").join
[jQuery] Asp.net AJAX form
Hi,all. I wanna create ajax form in asp.net that have loading image, how can I do this? loading image (gif animation) will show utill postback response. Thx K1
[jQuery] Datepicker issue
Hi there I have a problem with the date picker and was wondering if something had already been developed to sort it out, or whether I would need to do one myself. With a datepicker in the webapp we are developing, we want to allow users to view data based on past dates (ie anything from an old date up to present date). So with this in mind I have set the max date on the datepicker like this {maxDate: +0} so users can't pick dates beyond today. However if the user manually enters the dates (say beyond
[jQuery] Variable in :eq() with jquery.calculation
Hi All, I'm trying to use jquery.calculation to calculate some text inputs versus a selected field. I'm running into an issue with using variables to select information from the same row. Here's what I have so far. Any help would be greatly appreciated: <script type="text/javascript"> $(document).ready( function (){ $("input[name^=module-]").bind("keyup", recalc); $("input[name='input-positions']").bind("click", recalc); recalc(); } ); function
Dynamic input type change - password to text
Hi all, I am trying to setup a password input that fist shows: "Password". When the user selects it (or focuses on it), it clears and becomes a password input. If the person, clears the password and leaves focus (blurs), the word password appears again. I did some research on this first. There is this article that requires creation of two inputs (hide one, show the other). I also read this article. Without confusing everyone, I am trying to do this simple and in a smart way: HTML BODY <input type="text"
[jQuery] Realtime ajax response
Hi, can jQuery display response from .post request in realtime? I force buffer flush in PHP with ob_start, and ob_flush, I know that I can set target='iframeID' to my form, but I need ajax and target should be div. Thanks
Image and Text Swap Problem
Hi, I'm having problems trying to accomplish an image/text swap. Here's my jQuery code: $(function swapImage() { $(".thumb_detail a").click(function() { $("#largeImg")[0].src = $(this).attr("href"); $(".thumb_detail a").removeClass("active"); $(this).addClass("active"); return false; }); }); ...here's my CSS: .thumb_detail a {color:#000000; text-decoration:none;} .thumb_detail a:hover, .thumb_detail a.active {color:#000000; text-decoration:line-through; } ...and here's
css themeroller scope with datepicker
Hi I'm trying to theme a datepicker without changing the styles on the rest of the page. Using the themeroller, I set the scope to '.sunny', but it is not immediately obvious how give the datepicker that class. Digging a little bit I found that the calendar element is a child of the body, but setting the class of the body has no effect. Setting the classname of the input also does nothing.. What should I be doing here? Thanks in advance! --Peter
[jQuery] [jquery.async.treeview] Loads full level instead of leafs of clicked branch
Hello, I have setup an async tree due to the big number of leafs (~2000) and the poor performance of the static tree when viewed on IE6/IE7. The async loads faster than the standard tree, but when clicking on a level 2 branch all the leafs of the tree are fetched, not just the ones under the clicked branch, so are all the level 2 branches when clicking a level 1 branch. The source of the tree is MenuTree.aspx, and it is called one time for each branch of each level, I mean, my level 1 has 19 folders,
There has to be an easier way...
Hello, I am very new to jquery ( a couple days in ) I am trying to create a navigation that utilizes the the jquery import command. I am able to create the import function and change the background-image of the navigation back ( to create an appearance of an active tab ) but the script is bulky and clumsy. There has got to be a cleaner way to make this work ( though it does do what I want it to) here is the code: $(document).ready(function() { $("li").click(function() { $("#textArea").show('fast');
[jQuery] Selected value in a dropdown fails
I've got a form with some field to post. There is two dropdowns (select - options). If the user doesn't fill all required fields, the form appear again after the post, and the correct values should be present. The first dropdown gets filled stright from the database. The options in the second dropwdown depends on the selected one in the first dropdown. The first dropdown works just fine, the option is present, and selected with $('#area').val(area); The options is present in the second dropdown (filled
[jQuery] $.ajax calls in firefox doesn't work
Hi to all. I have problem with $.ajax call with Firefox. At all other browsers works fine(Opera, IE6,Chrome) My code: $.ajax({ url : "statistic_json.php", type : "post", dataType : "json", success : function(data) { statistic_data = data.occupied; }, complete : function() { }, error : function(xhr, ajaxOptions, thrownError) { alert("error"); }, async : false }); Response from Firefox(taken
[jQuery] Quick question, basic stuff
Hi all, In a HTML document I'm having a few divs with the same class. In each of this divs is nested an unordered list with inside the list items some anchors. I'm trying to find a certain jquery expression which says I want link#3 from div#2. I've tried; $("div.pic:eq(1) ul li a:eq(2)").hide(); which doesn't seem to work... I think because you can't have :eq() twice as selector. How would I make this work?
[jQuery] validate classbased via ajax request
Hello, my forms are all css class based validated. Now I need to check some on them serverside, so I overload the regular validation methods (or is there a better way?). jQuery.validator.addMethod("date", function(value, element) { var preValid = this.optional(element) || /^\d\d?\/\d\d?\/\d\d\d?\d?$/.test(value); if (!preValid) return false; $.getJSON(urlDefs.validateDate + "?date=" + value, function(data) { var result = data.Data; //
[jQuery] Flash effect with show/hide
Hello, (Sorry for my english, it isn't my native language.) I would want to show a div (the information about the song) when the visitor hover on a cover art on a radio website but this div overlap the cover art with an opacity of 0.7 You can see an example here: http://www.cestici.info/test.jpg The problem is that when the information div appears, the mouse pointer isn't on the cover art div anymore for the navigator so the information div disappears, and so on... resulting in a flash effect. How
[jQuery] Get total items in jcarousel
Hi, Using the jcarousel plugin fine, but would like to get the number of items in the jcarousel. I see there are carousel.first and carousel.last variables but they are for only the visible items, not the total in the whole jcarousel. Is this possible? Cheers, Mike
Using jquery load some html, then affecting loaded content
I've managed to do two separate things: Load a bit of html... $('#button-div').click(function(){ $('#frame-div').load('bitof.html'); }); Make a large div slide from left to right within smaller div... $('.link1').click(function(){ $('.frame-inner').animate({"left": "0px"}); }); $('.link2').click(function(){ $('.frame-inner').animate({"left": "-640px"}); }); The problem I have is the sliding effect doesn't work when it has been loaded. There must be an easy way to do this?
[jQuery] Dynamically Created anchor tags
Hello! I need help on this. i created image links by reading an xml and creating the img and a tags in jquery. how do i put a function in it? i tried the function below but it doesnt seem to work. These image links are stored in the div: "thumbs" Below is the code: $(function() { $("#thumbs a").click(function(event) { event.preventDefault(); alert("Hello world!"); }); $.ajax({ type: "GET", url: "thumbs.xml", dataType: "xml", success: function(xml)
Does jQuery slow your web app? By how much? Is it worth it?
Hi All, Simple, but important question. I'm starting a web application that is intended to be used by business owners. I know that jQuery adds amazing effects (I am using only a couple), but I want to know by how much is the application affected by? And is it worth the effect on the application performance? Thanks, all4peace
[jQuery] Passing variables to .click
Hello, I was using this: onClick="parsetable('<?php echo $Region ?>')" but now I want to use the JQuery: $("#parsetablebutton").click( function() { How do I pass the parameter to the function? Would I set an attribute and read it with[att=XXX] where the attribute is the echo'd $Region or is there a better way? Thanks
[jQuery] JQuery with Crystal Reports .Net 2.0
Hello, Has anyone attempted using JQuery dialog to display crystal reports in .Net 2.0? Also, the crystal report viewer is within and AJAX update panel. We are trying to implement that and having nightmarish issues with printing and exporting the reports. If I use full postbacks from the report viewer, it closes the JQuery dialog. If I use async postbacks, there is no event to trigger the printing. Has anyone experienced this? Any help is greatly appreciated. Thanks, ND
How to change img src on click and release event effect
Hello there Can someone help me please. This is quite urgent request. am creating a menu where on hover i change images src, but i want to add another effect when clicked on the images , the image changes to state "ON". Plus if when i clicked on another image the previously clicked images should release it's state "on" back to "off". here is my code for hover +clicked $( function() { // set up rollover $("ul.SubItems li ").hover( function() { $(this).children().children('a').css('color','#FD8900');
How to build an Popup Window for Text in a hidden DIV
hello forum, i am very new to javascript and jquery. on my site i have a list of short quotes. right after each quote there is a hidden div which contains the complete text; by clicking a quote, i would like to open a popup-window which displays the complete text. how i can do this? do you have any suggestions? thanks, adam
Jquery autocomplete with combo box
hi, In our project previously we had combo boxes.we changed this one by using jquery auto complete , but the client asking they want auto complete with combo boxs . and also we had to go server to get the suggested list . i searched all the net i dint find any think .can u tell me any idea or example . thanks Usman.sk
[jQuery] Click Binding not Working
I have this code that works: var btnInput= document.getElementById('btnInput'); btnInput.addEventListener("click", showVal, true); Why doesn't this work? $('btnInput').click(showVal); $('btnInput').bind('click', showVal);
[jQuery] [validate] problem of defining custom rules
i played with the example.html from jquery.validate 1.55 and wanted to make a custom rule firstname that is required, with the message please enter a firstname. My changes were in the validate : $("#commentForm").validate({ rules: { firstname: "required" }, messages: { firstname: "Enter your firstname" } }); and then <input id="cname" name="name" class="firstname" minlength="2" /> my problem is that it is shown as valid, even i don't enter nothing. i don't know what i am making wrong Thanks, David
[jQuery] Repeating items - how can I set the attribute name with position information
Hi I'm not sure how to do this..but i've got a dynamic table (rows added/ removed by the user) I need the name attribute for the input tags add to look like "intake.answerMapped(nodeId-pos).value" i've put the nodeId into a custom attribute..so the input tag looks something like this <input type="text" nodeId="10"/> the pos variable should be the position in the table (i guess this is the position in relation to siblings)..so if i'm the 2nd row, and the node id is 10, then the name attribute should
[jQuery] $.inArray optimisation
Hello, The $.inArray function is defined in http://jqueryjs.googlecode.com/svn/trunk/jquery/src/core.js as: inArray: function( elem, array ) { for ( var i = 0, length = array.length; i < length; i++ ) { if ( array[ i ] === elem ) { return i; } } return -1; }, I'm wondering: would it be possible to take advantage of the built-in indexOf method of the Array present in FF Javascript engines? Im thinking of something like: if (typeof
[jQuery] Post PHP object via AJAX
Hello everyone! By writing this: $.ajax({ type: "POST", url: "some.php", data: "name=John&location=Boston", success: function(msg){ alert( "Data Saved: " + msg ); } }); we pass variables 'name' and 'location' to the file 'some.php'. How can we pass a PHP object???? Thank you in advance!
[jQuery] "This will cause an infinite loop. Aborting." on carousels that are initialized as hidden
To see the issue: Create a horizontal carousel inside a display: none container. Make sure it has zero margins if you want to see the issue in browsers other than Safari. Don't worry about the zero margins in Safari, it'll break anyway. The pos method will check the dimensions of the elements in the line var d = this.dimension(e); Unfortunately, if the parent container is set display:none, the dimension method's reliance on offsetWidth when calculating old will cause it to report back zero width
[jQuery] pagination plugin
Hi, http://plugins.jquery.com/project/pagination mentions an IE 7 issue. Are people successfully using IE7 with this plugin? Thanks. -- Michael Finney - "Always Striving To Serve You Better Every Day" http://www.SmilingSoftwareSolutions.com
show an element among others
Hi every reader, this is my first participation I have diferent div elements in my page with the class named maker, for each div i gove an id called maker1, maker2, maker3... in he other side of the same page i have a liste of images with ids, iimage1, image2 image3... right? My goal is to hide all the div elements when i rollover on an image and show the div wich have the same number in its id as the image id. Nothing is better than an example for expalin: when i rollover on the image with the id
Flexigrid - column headers
Hi guys, I am using flexigrid in my development project. The column headers I want to use are too long, i.e. too many chars, and I was wondering if anyone knew how to either, word wrap the column headers, or use tooltips to show the complete column header on hover? thanks in advance Tony
Using hover and click together... (newbie)
I'm building a menu that uses animated hover and click commands, but I'm having trouble getting them to work together. The goal is to have the opacity animate to 75% during a hover and then when clicked it would animate to 100% and stay there (until another click). The current code (below) works except for the opacity staying at 100%, even after a click the opacity animates back to 50% when the mouse leaves. You can see it at http://stuckonon.com/tester.html#projects Borrowing code from others, this
[jQuery] [autocomplete]
we need to add a virtual keyboard to the same textbox which uses yours autocomplete plugin. is this applicable with your autocomplete plugin
Post PHP object via AJAX
Hello everyone! By writing this: $.ajax({ type: "POST", url: "some.php", data: "name=John&location=Boston", success: function(msg){ alert( "Data Saved: " + msg ); } }); we pass variables 'name' and 'location' to the file 'some.php'. How can we pass a PHP object???? Thank you in advance!
jquery Callback
I have a script that displays data from the database unto my screen. Everything works great except I am unable to pass my jquery variable to the html code: "fnRowCallback": function( nRow, aData, iDisplayIndex ) { /* Append the grade to the default row class name */ var aTT = aData[4] - aData[3]; $('td:eq(4)', nRow).html( '<b>aTT</b>' ); } What I am doing here is substracting the data element in aData[3] from aData[4] and assigning them to the variable aTT however, Im trying to display it, but on
Need help replacing iframes with jquery ajax
Hi, I have currently several iframes on my main page to display content. One of the iframes contains a form (shoutbox). When the form is submited the post values are stored by php in db and the same page is shown with the updated shout list. My problem is: I can use jquery .load or .ajax function to fetch external content inside same div in main page. BUT..... Question: How can i access a form inside the fetched document and submit it inside the same div and send the post to itself for php db insert
[jQuery] (validate) hide <label> when empty
I'm trying to find the option that hides the default <label> tag if there is no message displayed in it. Can someone help? I want to display a message at the top of the form when the input fields are empty, but display no text message. Only specific fields have messages associated with them which I have defined. The issue is that the defualt errorElement is adding space to my form even when the <label> tag is empty. here's what I have <SCRIPT> //Sets main rules for validation $(document).ready(function(){
Next Page