[jQuery] Suggest scenario for pup-up form edit
Hi, The scenario is: On a page there's an area with some details. When user click there a dialog opens to edit the fields. User can click Close/Cancel or Save. If Cancel - dialog gets closed. If Save -the data gets posted and then one of the 2 scenariouses happen: 1. Data is valid - dialog is closed. The information on the page is updated with new data. 2. Data is invalid (validation errors or something) - dialog is refreshed with all the fields and validation errors. What exactly I'm interested
[jQuery] jQuery Setup
Can I use the jQuery.js on http://code.jquery.com/jquery-latest.js, or must I download jquery.js to my server? If the answer is "no", my hosting service does not support GZIP -- so what file do I install on my server? I've tried both jquery-1.3.2.min.js, and jquery-1.3.2.js.txt and they don't work, also tried simply changing their names to jquery.js. If the file I need is in jquery-1.3.2.min.js, or jquery-1.3.2.js.txt how do I convert it for use? As you'll understand, I'm a total novice with JavaScript,
[jQuery] problem with events and tablesorter
hi, I'm using table sorter. This problem only occurs on pages that aren't the first page. I have a class called 'clcls' on each individual cell in column. For testing purposes I have the click open an alert box. The class is applied to the cells, but on the second page in table sorter the clicks don't have any response. Can somebody make sense of this? Thanks! :)
[jQuery] getJSON callback? does not work with querystring param
This works fine: $.getJSON("http://localhost:59396/xxxWeb/ CarouselHandler.ashx?action=getproducts&ids=" + ids, function(data) { carousel.size(allProductIDs.length); if (numberOfImagesLeftToShow < numberOfImagesToDisplay) { first += (numberOfImagesToDisplay - numberOfImagesLeftToShow); } var d = 0; for (var i = first; i <= last; i++) { if (d != undefined) { // add data using index of the array returned by JSON (which starts at 0) carousel.add(i, decode(data[d].ImageTag)); } // set to last ProductID
Simple Show/Hide problem (toggle)
Hello, I am trying to create a check button on a form that shows or hides a new field dependant on the state of the checkbox. (ie. checked or not checked). I am a complete jquery newcomer but my research leads me to believe that the code below will help me achieve what I need. $(document).ready(function() { $('-----').click( function() { $('-----').toggle(); }); }); The form is generated by 'cforms II' (a wordpress plugin). The code regarding the checkbox is the following: <li id="li-5-9">
Optimizing large dynamic <select>
I'm building on-the-fly <select> lists from JSON data fetched from the server. Some of then include a large number of items (>20,000). The SQL and HTML parts are working fine. The AJAX script fetches data fairly quickly (around 1 second) and large selects are not a problem once they're built (the browser handles them nicely, even IE). The bottleneck is in the process of picking the JSON data and building the <option> tags. That can take a full minute. What's the recommended (i.e. fastest) method
[jQuery] Sortable
Hi, I'm using sortable and must get the id of the element being moved. Somebody help me? My code: $(function() { $("#sortable").sortable(); $("#sortable").disableSelection(); }); <div class="demo"> <ul id="sortable"> <li class="ui-state-default" id="item_1">Item 1</li> <li class="ui-state-default" id="item_2">Item 2</li> <li class="ui-state-default" id="item_3">Item 3</li> <li class="ui-state-default" id="item_4">Item 4</li> <li class="ui-state-default" id="item_5">Item 5</li> <li class="ui-state-default"
[jQuery] Getting Dynamic Values from MySQL data displayed via PHP/HTML
I have multiple rows of data in an HTML table. E.g., financial transactions. In each row I have an HTML dropdown SELECT with options (user will select transaction tag). I want the transactionID and selected tagID to pass to an onchange event for that unique row. The transactionID comes through for the unique row of data, but I can't get the respective tagID to come through. Any ideas? Thanks. $(".selectList").change(function(){ var formvalue = this.id; var tagid = $(".selectList").val();
[jQuery] [tooltip] retrieving item description of link from JSON file
Hi there, For our sitemap, I am attempting to create functionality that when a user hovers over a link, a description is shown in a tooltip, similar to how a video and it's description show on hover at netflix.com. Our sitemap has a sister json file, that has the description fields in it. My thinking is that when you hover over a link, the $.getJSON("") is invoked and is iterated through, returning the description field for the item when the link rel tag == the id field in the json file. I am successfully
[jQuery] plugin blockUI : display error
Hi, I use the plugin blockU for one of my page, and page is perfectly what i was expected but the problem is the display of the block page under IE. here is my problem : after the block page appear, it don't dissapear even if the timeout is over.I tried several methods, but the same errror occured. I would be grateful is someone can check my code : $('#result-success').click(function() { $.blockUI({ message: 'Data updated !' }); setTimeout($.unblockUI, 1500); }); As
[jQuery] ie7 select-dropdown and max-width
i am trying to get ie7 to behave like other browsers in a form with a very wide "select" like a country listing. i want there to be a width on the "select", but let the "options" width overflow as necessary. the only javascript that halfway allows this, something like i am using... $(function() { $("select").mousedown(function(){ if($.browser.msie) { $(this).css("width","auto"); } }); $("select").change(function(){
[jQuery] IE (any version) is not parsing returned JSON via getJSON or $.ajax calls
I am trying out $.ajax instead of getJSON for debugging purposes. Because getJSON did not report an error in IE (6,7 or 8) and I am trying to figure out why a jQuery plug-in is not painting my returned images to the screen in IE but is in other browsers. So I tried this. Interestingly enough, it hits the error event in IE but not firefox, safari and the rest and I don't know why (this code works great and renders my data just fine in FireFox and the rest). I know my returned json is valid: $.ajax({
[jQuery] Select List With Multiple Selections Hack
When using a select combo box that has multiple selections enabled, my server was not seeing it as an array. It was only seeing it as a single variable value. All I did to correct this was add [] and the end of the name attribute. Ex. [code]<select name="categories[]" id="categories" multiple="multiple" size="4">[/code] Now my LAMP server sees this variable as an array in the $_REQUEST Dunno if this is supposed to work like this. Thank you. ~ Shawn
Ajax: Delete Records using a LINK
Hello, I'm currently working on a ajax-based website with jquery. Index.php contains a div container, which the new data from read.php is loaded in, by jquery after a set interval of seconds. That all works like a charm. Now comes to problem, the read.php lists several records, which are read from a database. I was looking for a possibility deleting those records using jquery ajax. Which means there's a delte LINK next to each record. I've been search through the web for almost two days and found
[jQuery] Join several JS scripts into one big file to lower http request
I've got on site a huge amount of js, 'single' script. What I want to do is to pack them into one file. Could somebody assist me in doing this? Tried before but something crashed... Here is package: http://rcdrugs.com/_done/js.zip I've posted this question on several boards: - http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_24498924.html - http://forum.webhelp.pl/viewtopic.php?p=906036#906036 - http://forum.php.pl/Polaczyc_wszystkie_pliki_js_w_JEDEN_wielki_t124138.html
[jQuery] Draggable+Sortable and ui.item
I am building a basic draggable+sortable page based on this demo:<div> </div><div><a href="http://jqueryui.com/demos/draggable/#sortable">http://jqueryui.com/demos/draggable/#sortable</a></div><div> </div><div><a href="http://jqueryui.com/demos/draggable/#sortable"></a>My sortable list will start out empty and the user can drag various draggables onto the sortable. </div> <div> </div><div>I want to add a "delete" icon to each of the items that are dragged onto the sortable so they can be removed.
[jQuery] Reference a selector that was included via "load".
I have a div on my site that I am populating with a "load" that gets some html from another file on the server. This included file has a div on it that I want to now reference and populate with the value of a hidden form field on the page doing the loading, but when I do it, it looks like nothing is happening. code: //load data from external file into generalInfoData div $('#generalInfoData').load('_displayGeneralInfo.cfm'); //_displayGeneralInfo.cfm contains an empty div with ID homePhone //the
[jQuery] (validate) checkbox group minlength --> same name == only 1 value posted to php
Hi everyone, I am running into the following issue. The validation plugin allows to check and make sure that at least one of a group of checkboxes is checked, but for that to work I have to call all of them the same name. Validation works great when I do that. Only problem is when I submit the form: If more than one box is checked, only the last value will be available (I'm echoing the $_POST [] array in PHP) - this is a predictable behavior from HTML forms - normally you wouldn't call checkboxes
[jQuery] unsubscribe
unsubscribe
[jQuery] Finding and Filtering implementation
Hello Experts! I have a staff list that uses a text input livesearch with filter on/ off feature. I am new to JQuery, don't really understand the syntax for advanced selecting, so I'm writing the same function 12 times for 12 lists. I need to simplify things with a generic function that toggles checked boxes on/off for the currently visible list only. No separate classes for every dl. The jquery I tried (to NO avail) looks like so: var filtog = false; $('a.filtertoggle').click(function() { $(this).closest('div').nextAll('dl.listcontent
[jQuery] JCarousel not rendering added data in IE 6, 7, or 8!!!!!!!!!!!!! Works in all other browsers
I have not been able to get my JCarousel implementation to show the added data in IE 6,7, or 8. It works fine in all other browsers..which is just weird especially when the creator's demos all run fine in IE (http://sorgalla.com/projects/jcarousel/). I simply added some simple Javascript logic to my own ItemLoadCallback functions and the carousel doesn't load images in IE8/IE7 or even IE6 at all when it's fine in all other browsers. I have valid JSON coming back and it's working fine in FireFox,
Jquery AJAX response showed on "new" page
Hi guys! It's the first time that I come across something like this so I would like to hear from you if this make any sense: I get all the ads of my site using AJAX calls with jquery. It seems that if you navigate to a different page interrupting an ajax request the response is showed in the new page. Let's try to explain this better wit this time line 1) User Navigates to Page1. 2) Page1 requests an ad to the server using ajax/jquery. 3) User navigates to Page2 clicking a link on Page1 (before the
DISABLE BUTTON AFTER 1 CLICK ->JQUERY: NOT WORKING WITH I
Hello there, I am using Drupal forms with Jquery. I used the following code to disable a button after it is clicked to prevent double updates. $(document).ready(function() { $('#node-form').submit(function (e) { var settings = Drupal.settings.block_submit; var inp; if (settings.block_submit_method == 'disable') { $('input[type=submit]', $(this)).attr('disabled', 'true').each(function (i) { }); $(this).submit(function (e) { return false; }); } return true; }); }); Form ID should be specific to: "node-form".
[jQuery] Table cell formatting (highlighting) upon ajax reload based on cell content?
Need some suggestions on how-to control cell(s) format on an ajax reload. The server-side program can convey necessary coding with each ajax load. I'm sure there are numerous ways to do this, but I just need some ideas to get started. Ransom Fitch old-tyme programmer, neophyte with javascript
[jQuery] UI Sortable - Limit drag to item header
Hi! I'm wondering how I can limit the "dragability" of an sortable item, to ex. a element inside the item. Meaning, I only want the item to sort when the header of the item is draged. Is there a simple way to do this, or do I have to modify core code/ create a helper to accomplish this functionallity? Have read the docs, but haven't found anything that mentions this.. Best regards, Robin
[jQuery] Reload events after ajax
Hello, My code: html: <div class="ajax_here"> <div class="breadcrumb"> <a href="http://page.com" class="backlink">Albums</a> » <a href="http://page.com?album=1" class="backlink">Album 1</a> » cxzcc.jpg </div> <div class="prevnext"> <div class="prev nawi"><a href="http://page.com?album=1&photo=1">Previous Photo</a></div> <div class="next nawi"><a href="http://page.com?album=1&photo=9">Next Photo</a></div> </div> <div class="blablabla"> [...] </div> </div> js: $().ready(function (){ $("div.nawi
[jQuery] (validate) No-URL
I used the URL checker in the Plugins/Validation, to create a no-url checker. This can be useful to prevent some spam from coming through in a form. nourl: function(value, element) { return this.optional(element) || !(/^(https?|ftp):\/\/(((([a-z]| \d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[! \$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d| [1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\. (\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-
jQuery autocomplete with gMaps
Hi guys, exist this: http://addresschooser.maptimize.com/exa ... otype.html in jquery? Thx thousands :wink: :wink:
[jQuery] Customizing Gaile Carousel: hover and click conflict
I've customized Agile Carousel (I'm using JQuery 1.2.6) to fit what I need, that is a single slide that rotates with a row of associated buttons. In the unaltered state, I can click on a button, the slide show will stop and show the correct slide. Now, when I add a hover function, the correct slide shows, but the button class is messed up so it will never show again, and the click no longer works. I've worked on the hover function until I'm crazy. css only controls the images for the button rollovers
[jQuery] event.stopPropagation() is preventing a live event on a child element
As far as I understood, stopPropagation() is supposed to stop events bubbling 'up' though the element tree (through parent elements). Eg. If I use stopPropagation() on a click event on an anchor element in a list, the event would not be triggered on the list. In my code I have a popup div, that needs to have stopPropagation(), as a click on the document (everywhere other than the popup) will hide it. When I add an element to the popup that has a live click event, the live click event is never called,
[jQuery] Inclusion of external scripts ("best" approach)
Hi, I guess most of you are aware of the peformance tip: put JavaScript at the bottom of the page. Now, what I have seen on quite a few pages is that the jquery.js is placed in the header, and a file with all the code inside $ (document).ready somewhere before the </body> tag. What are the benefits of this approach? Why not putting both files at the bottom, and maybe even merging them into one file to be placed at the bottom (which would also mean that you have one http request less)? One explanation
[jQuery] JCarousel not rendering images in IE
Has anyone had a problem where JCarousel does not render images in IE 8 but works fine in FF?
[jQuery] Function to parse query string from URL?
Hello, a quick question in case I'm being stupid :-) I see that jQuery provides a function to turn an object into a set of URL query parameters: $.param({foo:"xxx", bar:"yyy"}) => "foo=xxx&bar=yyy" My question is: is there a function which does the opposite, i.e. parsing a query string into an object? The reason is that when I make an Ajax request, I want to take some parameters from the original page and include them in the new request, and modify others. I can get the original page's query string
[jQuery] Looping through all the selected checkboxes
This is what i have. It does not correctly add two values when two checkboxes are checked. It should add up to 160 but it adds up to 20 instead! any ideas? Thanks Patrick <label><input type="checkbox" name="additionals" id="NutsandBoltsPreconference" value="150" /> Nuts and Bolts Preconference</label><br/> <label><input type="checkbox" name="additionals" id="TestAdd" value="10" /> TestAdd</label> $('input[name=additionals]:checked').each(function() { amountdue += parseFloat( $('input[name=additionals]:checked').val
[jQuery] Always escape with two backslashes?
Hello! I read in the documentation, the special characters like ':', we must escape with TWO backslashes. But not always: <script type="text/javascript"> function Nyom() { if ($('#pipa\\:x').is(':checked')) { $(':checkbox[id^=pipa\:x\:]').attr('checked','checked'); } else { $(':checkbox[id^=pipa\:x\:]').removeAttr('checked'); } } </script> <input type="checkbox" id="pipa:x" onclick="Nyom()"/> <input type="checkbox" id="pipa:x:1"/> <input type="checkbox" id="pipa:x:2"/>
Jquery event in Google Map info window?
Hi, I am new to Jquery (a bit new to javascript as well...), and i am developing a web application using Goolgle map, i found that JQuery functions inside Google Map info windows isn't firing, could anyone help? thanks in advance. Belows are some of the codes. function addMapClickEvent() { GEvent.addListener(map, "click", function(overlay, point) { if (overlay) { //map.removeOverlay(overlay); } else { var marker = new google.maps.Marker(point); map.addOverlay(marker); var html = document.getElementById('divStoreUnit').innerHTML;
[jQuery] [validate] problem usind rules("add") with classes
Hi, I am trying to use $(".euro").rules("add", "digits") for my form but it seems that only the first matching input field with class "euro" is being validated using the rule "digits". my form looks like this: <input name="costs[1]" value="" class="euro"> <input name="costs[2]" value="" class="euro"> ... This is a generated form with a changing number of input fields so I thought it would be the best to use a class for all fields to apply a validation rule. But apparently the rule is only applied
Click right side of image for next image, left side back?
Looking for an easy way to do this. Essentially a faux book where each image is a double page spread - clicking the right side would load the next double page spread, clicking the left would go to previous. All images would be the same size, and it would have to be inline (not like a lightbox popup). In my head I thought this would be very doable but I can't track anything down that accomplishes it. Can anyone help and/or point me in the right direction? Thanks.
[jQuery] [autocomplete] focus issue.
Hi, I'm wondering that what is the purpose of the field.focus() line inside the Autocompleter.Selection function in the autocomplete plugin. $.Autocompleter.Selection = function(field, start, end) { /*...*/ field.focus(); }; Because with that line the autocomplete has some very bizarre (imo) idea of locking the focus to the field that fired the autocomplete even if the user has decided not to select any of the items and has instead clicked on another field. You can see this in: http://jquery.bassistance.de/autocomplete/demo/
show hide div
Hi experts, I am learning JQuery, wrote this code but not working, please help. <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> <script type="text/javascript" src="jquery-latest.js"></script> <style type="text/css"> .showed{display:none); </style> <script type="text/javascript"> $(document).ready(function() { $("#play").click(function() { $(".showed").show(); $(this).next().hide();
Next Page