jQuery Auto Calculation Question!!!
I have a jQuery auto calculation script, which dynamically calculates a row total then finally SUMs the grand total, and I need to add just two features to it. 1st feature: How can I assign a read-only textbox for the "Grand Total"? 2nd feature: How can I auto-calculate the "buy used?" column, and reflect the result in the sub-total column?You can view and download the script example here http://www.mugnets.com/calcscript/ To use: Just type in any number into the "Qty" field, and you will see the
How to make automatically check radiobutton?
How to make automatically check radiobutton with jquery if another radiobutton selected? In this case - if Cash od delivery selected - then Surcharge 10$ is automatically selected (mean if user want make order with option cash on delivery, must pay more money) Idea could be with validation if one is selected one coma ona or one coma two must be selected? Please help how to code it... <form> <input type=hidden name=todo value=post> <div> <p>Delivery:</p> <input type=radio name=sex value='ups'
using ajax with php, getting the LENGTH of the array
I am using jquery (.post) to send user input to a php script which returns an array. If I return the array without defining the keys (see the bottom line of the PHP below) the returnArray.length correctly gives the length of 3. However, if I try to define custom keys (the first line of PHP) returnArray.length has a value of "undefined". Is there some special way to reference the length property when the keys are customized? I know I can just define two arrays in PHP, but one array is neater, and
Why li:eq() doesn't work ?
Hi I'm trying to use addClass in a img inside the li, and I try to get the depth with a variable for be use in :eq() of the next way, but doesn't work, but if change my depth variable for a simple data inside the :eq, works it, but I can't do it this way because, all images change the class, I need just change the image inside the li. Thanx for your help ! this is the html <ul id="MenuItemsZavaSocial"> <li class="offPicture"><img class="offPos" src="images/diabeticos.jpg" /></li>
JQuery in CodeBehind
I need to change the css class background-color in codebehind. I know how to do it in aspx. But how to do that in cs? $("#header").css('background-color', 'red'); Thank You
stop fadeIn
hello@all, I try to implement a pager for my site. the user should have the ability to search for different things. when the user enter a catchphrase he get the result. Per page there are 10 results which jquery fadeIn. the issue is that when the user is too quick and click the link for the page 2 while jquery fadeIn the 10 results for the page 1 there is a mess. some results, which belongs to page one, appear on page 2. I don't know how to stop the fadeIn chain which was started on page 1 (but the
J Query Animation Help
Im not sure if this is the correct forum for this but we have a j query slider on our site Wexford Strength As some of you may notice when you scroll over Our Team or Our Services or What We Do the dropdown box that the website has goes behind the j query slider. Now the problem is it doesnt happen on my Safari or Mozilla Firefox Browser on my Mac and it doesnt happen on Internet Explorer or Google Chrome on our Windows PC but its happening on the clients internet explorer is there any reason for
jQuery - Using multiple Input
I am trying to set focus to the first checkbox or text box on the page. Some pages have text boxes at the top, and others have check boxes. The following is the code I am using for the first text box, however it I require the possibility to use checkbox or text. $(function() { $("#divId :input[type='text']:first).focus(); }); Can someone help me please?
$.keyup() and $.change() don't work in chrome
I use this code to create a div element with inside a text and a button, for than adding this div in a cell of the jquery grid. Everything works fine with firefox and IE instead in chrome I found out with alerts that only the click of the button is added, the other handlers like change and keyup NO or are not triggered. myJQGrid.myElemKodi = function (value, option, disabled, lastsel2, id) { var el3 = $('<div></div>'); var textField = $('<input type="text" />'); textField.attr('id', id +
Problem with noConflict()
Trying to use noConflict() to allow a plugin that uses 1.3+ along with others that require 1.2.6. Here are the calls in my header: <script type="text/javascript" src="js/jquery/jquery.1.4.4.min.js"></script> <script type="text/javascript"> var $jq = jQuery.noConflict(); </script> <script type="text/javascript" src="js/jquery/jquery-1.2.6.pack.js"></script> Here is the call on my page: <script type="text/javascript" src="js/jquery.colorbox.js"></script> <script type="text/javascript"> // <![CDATA[
$().animate IE ignore "bottom" value
Hello, I use this code to animate an image: $( "#myimage") .everyTime ( 10000, function (){ $(document).ready(function(){ $("#myimage").animate({ width: "107px", rotate: '+=0deg', height: "89px", bottom: "-95px" }, 0 ); $("#myimage").animate({ width: "0px", rotate: '+=-58deg', height: "0px", marginLeft: "5.5in", bottom: "200px" }, 3500 ); $("#myimage").animate({ width: "0px", rotate: '+=-302deg', height: "0px", marginLeft: "6.8in",
How to load image with jquery ajax
I have a webpage with a button and image. I add jquery fade in and out effect to the image when button is clicked. The problem is when button is clicked, the entire page is updated, not the partial update of image only as I want. So I want to know how to get partial update of image only with jQuery ajax. Thanks. The code is, $("#RadioButton2").click(function () { $("#Image1").fadeOut("slow", function () { $("#Image1").attr("src", "images/img3.png");
Jquery Sortable Connect List + PHP/MySQL
Hi everyone! I posted this question on stackoverflow; I've been searching everywhere for a solution without luck. What I'm searching for i a way to merge the example found herehttp://jqueryui.com/demos/sortable/#connect-lists with PHP/MySQL. There are several examples out there that works with just the one list i.e. http://www.wil-linssen.com/musings/entry/extending-the-jquery-sortable-with-ajax-mysql/ But I haven't found a single example with multiple lists. Does anyone have ha solution or a link
Passing function literal via event
Am I able to pass a function literal (at least I think that's what it's called) to a jquery event handler, and retrieved the event details in the function? Like so: function doSomething(ev) { alert(ev); } $(someElement).click(doSomething); I think that's more efficient that the following, when registering events on a large number of elements, or am I wrong?: $(someElement).click(function() { doSomething($(this)); });
Setting days off with the Datepicker
I am using the Jquery Datepicker but cannot figure out the code to set Sundays and certain other days (bank holidays) as non-selectable. It's the second part of the code that should be setting these 'days off' but when using the code above all days are available. Any ideas?!?!? <script> $(function() { $('#date1').datepicker({dateFormat: 'dd/mm/yy'}); setMinDate(); // Set it now setInterval(setMinDate, 60000); // And check every minute }); function setMinDate() { var minDate
Change even on fileinput problem wit IE?
Hi! Pleas take a look on this example : http://www.test.figurspel.net/ Try this : Browse the URL with Firefox Set the fileinput with a file When the filedialog is closed a new fileinput will be shown Now, try the same thing with IE (8) You will see that a new fileinput is not shown, not ontill you set the focus on another control (like the url field)In this case I need it to work as it does in Firefox, any suggestions on how to resolve this in a safe way? BestRegards
Overlay shifts div when triggered
I appologise in advance as I already posted this a few mins ago and I was unable to edit the post as it was under moderation. However upon further testing this appears to affect Chrome aswell. When an overlay is triggered it is causing the content div to shift apprx 50px to the right. The content div is inside a page container div here is the css code for both. This is not happening in IE 8. #page-container { width: 760px; margin: auto; text-align: left; } #content { line-height: 18px; } #content
Why the Ajax calls could not be cached by Firefox?
I noticed that all simple jQuery ajax calls are unable to cached by Firefox (no problem with other major browsers). See the following test code: $(document).ready(function(){ $("#load").click(function(){$("#test").load("/test.txt");}); }); The mod_expires of Apache2 is enabled and test.txt can never be cached by Firefox via Ajax calls. (Firebug response status code 200 OK)
Chain animation for different element
Hello. I'm trying to have an effect happen after an effect for some other elements has finished. $(document).ready(function() { $("#about_div").toggle(function() { $(".work_divs").slideUp(600); $(this).slideDown();I've tried $(document).ready(function() { $("#about_div").toggle(function() { $(".work_divs").slideUp(600,function() { $("#about_div").slideDown(); } // can't use this - it refers to .works_div? );and a couple of variations. I increased
Help - Get tag by tag
Hello, If I have this code: <div id="test"> <div id="inside"> Hello </div> </div> And by the div "test" i want call get the tag "inside", how can I do that?
Jquery form help
I have a form using asp formmail script with a hidden field for the person's email being sent to. Using Jquery I would like to be able to, if they check a checkbox the form is sent to multiple people and if the checkbox is unchecked then the form is sent to the orginal recipient. The form uses get instead of post to process the form... Much Appreciated
Jquery Ajax with WebMatrix
So using this: $.post("Service", { param : "value"}, function (data) { alert(data); });I am able to pull out the values just fine using Request["param"]. Now if I'm using : $.ajax({ type: "POST" url : "Service", data : ({ param : "value" }), contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { alert(data); } });I am not able to find the values in Request,Request.Form, Request.Params
Uncheck and Disable Multiple Checkboxes with One Checkbox
I have searched the forums and have not seen a solution for this. I have the following checkboxes: [ ] None [ ] Option 1 [ ] Option 2 [ ] Option 3 When the first checkbox is checked (None), I need the other three checkboxes to: 1. Become unchecked if the user had checked them 2. Become disabled If/when the first checkbox is unchecked after that, the other three checkboxes would become enabled. Can someone help me out? I have little jQuery experience and am learning as I go along.
How do i change the content of a specific div in a cell of a grid?
Currently i am using this to modify the "html" of a specific "column/cell" by finding the "td" of the "grid" at specific "rows". $("#VGrid1_MainGrid tr:nth-child(" + iRowNumberGrid + ")").find('td').eq(26).html("HTMLHERE");After that is done, how do I [ (a) access, (b) modify ] the individual "div" content that is in it for the "Grid" at particular "row" and "column"? RowNumber = 2, column = 26 Example <td> <div class="myclass"> <div id="div1">yes man</div> <div id="div2">Add content</div>
Radio group IE validation issue
Hello, For some reason when I try to submit my form in IE8 it doesn't get past the radio group. It keeps asking me to select an age even after one has been selected. Validation works but it's not picking up that I have selected one of the items within the group. http://pretendcity.org/forms/asq/ Thanks.
Jquery Autocomplete doesn't work with Jquery 1.5
Hello! I'm using the Jquery Autocomplete Plugin with jquery.1.4.4. I tried to use a new version of jquery, like 1.5.1 but doesn't work. I'm asking if there is a way to work with the new version of jquery or i must change my autocomplete and use the jquery ui autocomplete. Thanks!
Disable part of style with jQuerry
Hi I've created a table style in css file, and here is a part of the code. #tab tbody tr:hover td {color: blue; background: -moz-linear-gradient(6% 75% 90deg,#8F8F8F, #EBF2F2, #C7C7C7 100%); } Is it possible to disable this hover without changing rest of #tab style in one selected table with jQuerry ?
identify which $. ajax AjaxStart's coming
$("#mask").ajaxStart(function () { mask.load(); }).ajaxStop(function() { mask.unLoad(); }); This code is executed in many places with different purposes, how could I identifywhich $. ajax AjaxStart's coming?
nested ul problem - get first parents..
Hi, I have a problem with selecting nested ul's This script should deactivate clicking in menu-items. The problem is, that if there more nested hidden ul's, the first child li is not clickable anymore. I like include only the first childs of #menu into the jquery not all nested ul. Could someone give me a hint? <div id=" menu> <ul> <li class="menu-item"> <ul> <li></li> <li></li> </ul> </li> <li class="menu-item">
How to compare textbox values in existing record in table using SP
Hello Im new here, I need help if my syntax is correct. if(first_name != <row.@firstname>) { alert("Record already exists! Search and use the record to continue transaction!")}; I attached the whole function. What I want to do is that whenever a user tries to create a new record using first_name, middle_initial, last_name and date_of_birth on the textboxes, these things will happen, 1. I have Sp working already that gets the fields of the table customer using parameter 2. then on my page
Accessing external var
Hi, I've been writing a script using the Flickr API. Basically it takes photos from a certain set and user and puts those in the fancybox format. The problem I have now is that whenever I want the set to change, I have the edit the javascript,. Instead I want to be able to change this in the html where it's being called. Here's the script: (document).ready(function(){ //insert your Flickr API key var api='6f9bff414d8f176e5c15359934c741bb' //insert the ID of the set you want to use var
Setting the Width of the Dropdown
Hi everyone, Sorry if this question seems absolutely basic. I use autocomplete on my application. The width of the dropdown is equal to the width of the Input element that is used. I would like to use a custom width for the Dropdown leaving the width of the input same. Can this be done? Abhay
Newbie Question - Resizing divs with slideToggle
Hi, I am trying to get my divs to resize but i am having a number of difficulties. I am new to jQuery so be gentle! :-) Here is what i am trying to achieve: 1) When the "About me" div is clicked - resize the "About Me" div and hide the other divs. (Which i have managed to get working) 2) When the initial animation has finished, wait for another click before resizing the div to its original size/position. (This is working but I have had to use the delay function to "pause" the animation - which
$.getJSON not returning any data for cross domain
below are my code $.getJSON("http://mydomain.com/phptest.php?jsoncallback=?",function(data) { alert(data.a); }); phptest.php echos out the following {"a":"hello world"} Yet, when i made the json calls(cross domain), it just return me nothing. However, under the same domain, I got the pop-up alert and return me the relevant data. But getJSON is suppose to be feasible across all domains irrespective of the same-origin policy. Please help.
Autocomplete Problem
Friends I have got a problem in autocomplete. The searched records are fetched from database. When any user's name are typed it displays with comma separator (,) but it's associated id are override by the current one. What I need is, these ids to be in comma separate form, i.e. 3,6,1, I tired using push operation but I failed. So I would like to know your suggestion. jQuery I have implemented is: <?php $this->widget('CAutoComplete', array( //name of the html field that will be generated
Loading content and appending to a div
Hi, From these forums I have learned I can load content and update a <div> using the following code: var auto_refresh = setInterval( function() { $('#loaddiv').fadeOut('slow').load('mypage.html').fadeIn("slow"); }, 5000); <div id="loaddiv"></div> However what I would like to do is load the html into a variable and then append it to the <div>. Looking through the forums I see people have suggested using get instead of load. However when I use $.get there is nothing in the responseText or responseXML.
querying XML ??is there any way to Query xml doc which was returned by $.ajax
Is it possible to Query response xml document from an $.ajax ...or is it possible to use Xquery with Jquery
Documentation comments -- please re-enable!
Hi folks -- I notice that on all of jQuery's documentation pages that I've visited recently, the Comments section is Closed. Does anyone know whether there was a compelling reason for this? I find that often the comments are extremely useful, explaining some gotcha or nuance that the main doc does not. Those notes are hard-won knowledge, I hugely appreciate the time it takes for people to add them, and I would love for that to continue. Thoughts? -- Graham
Loading html and manipulate it's DOM before inserting it into the document
Hi folks, I've some problems loading a complete validated HTML5-File (with <!DOCTYPE html> & <head> & <body>) from a given url, and manipulate it's content (respectively select a specific source-element in it) before inserting it into a target-element in the displayed document. loadContent = function(url, sourceElement, targetElemet) { var ajaxParams = {}; ajaxParams.url = url; ajaxParams.dataType = "html"; ajaxParams.success = function(returnedData) {
Loading all my scripts and libraries from a single script
I was just wondering if it would be a good practice to load all my .js scripts and .js libraries from a single file. I have been working on a few projects recently where I have had up 8 lines within my <head> tag. I figured using jQuery's $.getScript function inside a single .js file would be a good solution... it's easiert to perform logic within that .js file, only loading the resources needed... it would also minimise markup within the HTML files. The reason why I ask is because I have been to
Next Page