Search Results

Search found 23356 results on 935 pages for 'jquery ui'.

Page 9/935 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • jQuery UI datepicker will not display - full code included

    - by Bill Brasky
    I am having trouble displaying the jQuery datepicker as shown here: http://jqueryui.com/demos/datepicker/ I believe I downloaded all of the proper files, but to be certain, I started from scratch and ripped the demo site. Not all of it, but what I believed to be the important parts. The result is no datepicker to be shown and no javascript errors. Here is my full code sample: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="http://static.jquery.com/ui/css/base2.css" type="text/css" media="all" /> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/base/jquery-ui.css" type="text/css" media="all" /> <link rel="stylesheet" href="http://static.jquery.com/ui/css/demo-docs-theme/ui.theme.css" type="text/css" media="all" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> <script type="text/javascript" charset="utf-8" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script> <script type="text/javascript" charset="utf-8"> jQuery(function(){ jQuery("#datepicker").datepicker(); }); </script> </head> <body> <input type="text" id="datepicker" class="hasDatepicker" /> </body> </html> Any help would be very much appreciated. Thanks!

    Read the article

  • JQuery > XSLT Plugin > Component returned failure code: 0x80600011 [nsIXSLTProcessorObsolete.transfo

    - by Sean Ochoa
    So, I'm using the XSLT plugin for JQuery, and here's my code: function AddPlotcardEventHandlers(){ // some code } function reportError(exception){ alert(exception.constructor.name + " Exception: " + ((exception.name) ? exception.name : "[unknown name]") + " - " + exception.message); } function GetPlotcards(){ $("#content").xslt("../xml/plotcards.xml","../xslt/plotcards.xsl", AddPlotcardEventHandlers,reportError); } Here's the modified jquery plugin. I say that its modified because I've added callbacks for success and error handling. /* * jquery.xslt.js * * Copyright (c) 2005-2008 Johann Burkard (<mailto:[email protected]>) * <http://eaio.com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE * USE OR OTHER DEALINGS IN THE SOFTWARE. * */ /** * jQuery client-side XSLT plugins. * * @author <a href="mailto:[email protected]">Johann Burkard</a> * @version $Id: jquery.xslt.js,v 1.10 2008/08/29 21:34:24 Johann Exp $ */ (function($) { $.fn.xslt = function() { return this; } var str = /^\s*</; if (document.recalc) { // IE 5+ $.fn.xslt = function(xml, xslt, onSuccess, onError) { try{ var target = $(this); var change = function() { try{ var c = 'complete'; if (xm.readyState == c && xs.readyState == c) { window.setTimeout(function() { target.html(xm.transformNode(xs.XMLDocument)); if (onSuccess) onSuccess(); }, 50); } }catch(exception){ if (onError) onError(exception); } }; var xm = document.createElement('xml'); xm.onreadystatechange = change; xm[str.test(xml) ? "innerHTML" : "src"] = xml; var xs = document.createElement('xml'); xs.onreadystatechange = change; xs[str.test(xslt) ? "innerHTML" : "src"] = xslt; $('body').append(xm).append(xs); return this; }catch(exception){ if (onError) onError(exception); } }; } else if (window.DOMParser != undefined && window.XMLHttpRequest != undefined && window.XSLTProcessor != undefined) { // Mozilla 0.9.4+, Opera 9+ var processor = new XSLTProcessor(); var support = false; if ($.isFunction(processor.transformDocument)) { support = window.XMLSerializer != undefined; } else { support = true; } if (support) { $.fn.xslt = function(xml, xslt, onSuccess, onError) { try{ var target = $(this); var transformed = false; var xm = { readyState: 4 }; var xs = { readyState: 4 }; var change = function() { try{ if (xm.readyState == 4 && xs.readyState == 4 && !transformed) { var processor = new XSLTProcessor(); if ($.isFunction(processor.transformDocument)) { // obsolete Mozilla interface resultDoc = document.implementation.createDocument("", "", null); processor.transformDocument(xm.responseXML, xs.responseXML, resultDoc, null); target.html(new XMLSerializer().serializeToString(resultDoc)); } else { processor.importStylesheet(xs.responseXML); resultDoc = processor.transformToFragment(xm.responseXML, document); target.empty().append(resultDoc); } transformed = true; if (onSuccess) onSuccess(); } }catch(exception){ if (onError) onError(exception); } }; if (str.test(xml)) { xm.responseXML = new DOMParser().parseFromString(xml, "text/xml"); } else { xm = $.ajax({ dataType: "xml", url: xml}); xm.onreadystatechange = change; } if (str.test(xslt)) { xs.responseXML = new DOMParser().parseFromString(xslt, "text/xml"); change(); } else { xs = $.ajax({ dataType: "xml", url: xslt}); xs.onreadystatechange = change; } }catch(exception){ if (onError) onError(exception); }finally{ return this; } }; } } })(jQuery); And, here's my error msg: Object Exception: [unknown name] - Component returned failure code: 0x80600011 [nsIXSLTProcessorObsolete.transformDocument] Here's the info on the browser that I'm using for testing (with firebug v1.5.4 add-on installed): Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 I'm really not sure what to do about this.... any thoughts?

    Read the article

  • jQuery Sortable - Limit number of items in list.

    - by Adam
    I have a schedule table I'm using jQuiry Sortable for editing. Each day is a UL, and each event is an LI. My jQuery is: $("#colSun, #colMon, #colTue, #colWed, #colThu").sortable({ connectWith: '.timePieces', items: 'li:not(.lith)' }).disableSelection(); To make all LI's sortable except those with class "lith" (day names). User can drag an event from day to day, or add new events by clicking a button, which appends a new dragable event (LI) to the fist UL (Sunday). I want to make each day accept only up to 10 events. How do I do this? Thanks in advance!

    Read the article

  • jquery autocomplete filtering

    - by eidylon
    Hello all, I have a page, which uses jQuery Autocomplete on the second two textboxes (investigator and institution). It is getting the data fine, and displaying it, but for some reason it is not filtering the list of data as i continue to type. Anyone know why? Is there something i need to do to turn this on? According to the jQuery site, the only options to the autocomplete initializer are delay, minLength and source. Thanks in advance! I'm using jQ v1.4.1 and jQui v.1.8rc1. Below is the code which I am calling on $(document).ready(). function hookUpAutoCompletes() { $('table#params input[name=sinvestigator]').autocomplete({ source: "json-investigators.asp", minLength: 2 }) $('table#params input[name=sinstitution]').autocomplete({ source: "json-institutions.asp", minLength: 2 }) }

    Read the article

  • Listening and firing events with Javascript and maybe jQuery

    - by at
    In my Javascript and Flex applications, users often perform actions that I want other Javascript code on the page to listen for. For example, if someone adds a friend. I want my Javascript app to then call something like triggerEvent("addedFriend", name);. Then any other code that was listening for the "addedFriend" event will get called along with the name. Is there a built-in Javascript mechanism for handling events? I'm ok with using jQuery for this too and I know jQuery makes extensive use of events. But with jQuery, it seems that its event mechanism is all based around elements. As I understand, you have to tie a custom event to an element. I guess I can do that to a dummy element, but my need has nothing to do with DOM elements on a webpage. Should I just implement this event mechanism myself?

    Read the article

  • jQuery Tools - make tabs collapsible

    - by Cordial
    I'm using a basic integration of jQuery Tools "tabs" function and it's working perfectly for me, but the one thing it seems to lack over jQueryUI is that there's no way I can find to make the tabs collapsible. By that I mean all you need to add is collapsible:true to the jQueryUI tabs function. Does anyone know of a way I could append code to the following jQuery Tools statement to make the tabs collapsible? Any advice appreciated! $("ul.main_tabs").tabs("> .mainpane");

    Read the article

  • Jquery Tabs - Change css depending on a specific tab

    - by Jeff Dias
    So, I am working in this page http://universidadedoingles.com.br/text-tabs/tabs-text.html As you guys can see, I have four tabs and an arrow right below, I need to do that the arrow go below the selected tab, if a click on tab 3, that arrow should go below tab 3, simple as that! but I don`t know! You also can see that when the page loads on tab 1 and you click on tab 2 the effect I want works pretty well, here`s the jquery I am using for that: $(document).ready(function() { $("a.tab2").click(function() { $(".arrow-spacer").addClass("tabs2"); }); }); That`s it, thank you vey much for any kind of help. p.S - i am using a mac, so theres no IE for testing yet, this looks good in Safari and Chrome.

    Read the article

  • JQuery - Ajax saving sortables in connected lists when sortable item is moved

    - by Ben Sinclair
    I have multiple JQuery sortable lists that connect with each other... They allow you to assign users to certain roles. Basically what I want to do is when a user is dragged from one list to another, I want JQuery to pick up the first list that the user was moved from so that I can send an AJAX request to delete it from that list in my database. I tried the following but every time you move the user over a list and haven't even dropped it within a list, it sends this request which means I'll be sending multiple AJAX requests... Does that make sense? $( ".selector" ).sortable({ out: function(event, ui) { ... } }); From my testing, I can use the following code to just update the list that user has been moved to so I've got the second half covered: $( ".selector" ).sortable({ receive: function(event, ui) { ... } }); Hopefully I am making sense :)

    Read the article

  • Jquery mouseover event issues

    - by Shaun
    Hi I am currently working on a project where I am using jQuery to animate a block of text on mouse over. The event listener is on the containing div (as shown by the code below) and works really well until the mouse is over the title (.views-field-title) which is absolutely above the containing div. The animation begins to jump almost as though it is starting over? What am I doing wrong? $('#interior_design .views-row').mouseover(function(){ $('.views-field-title', this).stop(true, true).animate( { height: '+=10px' }, { duration: 'fast'}); }); $('#interior_design .views-row').mouseout(function(){ $('.views-field-title', this).stop(true, true).animate( { height: '-=10px' }, { duration: 'fast'}); }); Link to dev server: http://viva.bangtest.co.uk/interior-design Note: this site is still in development as such the jQuery is only on the above linked page currently. I'm open to all suggestions.

    Read the article

  • jQuery droppable accordion

    - by awshepard
    I've been playing around with trying to create a droppable accordion for a little while, and haven't gotten it to be very responsive. When I drag an item over the accordion, it takes 5+ seconds for the accordion element to open (if it does at all). Sometimes I have to "wave" the dragged element over the accordion element. I know I read something a while back about event processing in javascript - something along the lines of the browser not always passing control to the javascript engine when you think it does, or something like that, resulting in weird timing. Has anyone else seen tried to do this before? Have you found jquery/javascript to be this slow? Do you have any references for how to get a responsive droppable accordion (the jQuery UI site doesn't seem to, and I didn't find anything on SO or Google). Thanks!

    Read the article

  • Linking jQuery UI to the ASP.NET MVC 2 project

    - by Tx3
    What I am trying to accomplish is using jQuery UI dialog method from my own JavaScript source code file. I have this kind of links in the Site.Master <script src="/Scripts/jquery-1.4.2.js" type="text/javascript"></script> <script src="/Scripts/jquery.validate.js" type="text/javascript"></script> <script src="/Scripts/jquery-ui.js" type="text/javascript"></script> <script src="/Scripts/Common.js" type="text/javascript"></script> Common.js is my own helper file. jQuery works fine there, but when I try to call for example: $(document).ready(function() { $("#dialog").dialog(); }); I'll get "Microsoft JScript runtime error: Object doesn't support this property or method" Any ideas why this happens? jQuery Works fine, but jQuery UI doesn't.

    Read the article

  • Combinig JQuery datapicker with input field validation /filter

    - by Olav
    I am using the JQueryui Datepicker. But it doesn't really affect values entered manually in the input-field. Is there some way I can use the same (client) code to specify mask / validation on the input field (when the datapicker is not used - not just have datepicker output the correct format). What would be the most consistent way to do this in the JQuery framework? Thanks Remarks It seems jQuery put som restraints on input (I.e. I can only enter digits- mask "yymmdd") so the main thing is to get validation.

    Read the article

  • Extending a jquery plugins event callback

    - by Greg J
    I'm extending the functionality of a jquery plugin (foo) with another jquery plugin (bar). Essentially, the first plugin specifies an onReady(): var foo = $.foo({ onReady: function() { alert('foo'); }}); Foo is sent to bar as a parameter to bar: var bar = $.bar(foo); I want bar to be able to hook into foo's onReady event: (function($) { $.extend({ bar: function(foo) { var foo = foo; // How to do alert('bar') when foo.onready is called? } }); })(jQuery); I can override foo's onready event: foo.onready = function() { alert('bar'); } But I don't want to override it, I want to extend it so that I'll see both alerts when foo is ready. Thanks in advance!

    Read the article

  • Jquery - Forms Plugin, Dynamic Tabs

    - by user177874
    Hi guys, I am using JQuery UI tabs. When i create a tab using the "$("#" + target).tabs('add', url, title);" method it opens a tab and calls an ajax form correctly.. Now the problem exists when i open an identical tab containing the identical form. When the form is submitted using the forms plugin, things mess up. I am presuming this is due to multiple areas having the same div id and so the form plugin does not know which to update.. Is there a work around for this at all ??

    Read the article

  • jQuery Samples

    - by dwahlin
    Here are the jsfiddle samples that John Papa and I covered in our jQuery Fundamentals workshop at DevConnections last week. These were a few of the samples we wrote on the fly (so they’re not “perfect”) using http://jsfiddle.net and wanted to share. Additional jQuery samples covering selectors, DOM manipulation, Ajax techniques, as well as sample applications can be found here. You can also view the talks John gave at the conference here.  Code and slides from my talks can be found at the following links: Building the Account at a Glance ASP.NET MVC, EF Code First, HTML5, and jQuery Application Techniques, Strategies, and Patterns for Structuring JavaScript Code Getting Started Building Windows 8 HTML/JavaScript Metro Apps If you’re interested in learning more about jQuery check out my jQuery Fundamentals course at Pluralsight.com. Using the Data Function   Using Object Literals with jQuery   Using jQuery each() with string concatenation   Using on() to handle child events   jQuery - hover   jQuery - event handling variations   jQuery - Twitter (bind, append, appendTo, each, fadeOut, $.getJSON, callback, success, error, complete)r   jQuery - attr vs prop   jQuery - Simple selectors

    Read the article

  • jquery-sortable using behavior of a linkedlist

    - by BabaBooey
    I suspect I'm not looking at this issue in the right way so here goes. I have essentially a LinkedList of data on a web page (http://en.wikipedia.org/wiki/Linked_list) that I'd like to manipulate using traditional Linked List behavior (i.e. just updating the reference/id of the "next" object) for performance reasons. Where this gets a bit tricky is I'd ideally like to use Jquery's sortable to do this. Like the user would drag something up/down and I could just do an Ajax call to the server with the id of the object that moved and the new parent id of that object (and then behind the scenes I could figure out how to reconnect things..maybe need more data than that...). But every example I've seen where sortable is used they were sending the whole re-indexed list to the database to update which seems unnecessary to me. With a linked list to change an element's "index" I only need to make 3 updates which depending on the size of the list could be a big performance savings. Anyone have an example of what I'm trying to do...am I too far in left field?

    Read the article

  • Something like jQuery's .resizable but without the div's inside

    - by Brendon Muir
    Hi everyone, this is just a quick probe to see if this is technically possible. I'm wanting to enable the resizing of an image in the browser (also within a contentEditable area). Firefox and IE already allow this to be done with their inbuilt handles and it works fine. I'm wanting to implement something for Safari however because it doesn't support this natively. I've had a go with jQuery's resizable method and it does a very good job, however it relies on inserting a bunch of div's along with the image and wrapping that in a big div. This would normally be fine if we weren't concerned with the code generated in the contentEditable area, but we are because it's going to be saved back to the server. I could strip this extra stuff out on save, but I was thinking, is it technically possible to create a resizing script for images that doesn't rely on adding extra div's? Even if we decide to go without handles for now, and just concentrate on detecting when a user is close to the edge of the image, change the mouse cursor to a resizing one, and detect clicks and drags in the 5px's around the edge of the image, is this possible? If it's possible, I'm assuming (hoping) that perhaps it's already been done, but my searching hasn't turned up anything so far. Keen to hear any ideas :)

    Read the article

  • [jquery] multiple resizables acting strange

    - by Noweem
    Hi there everyone, I'm trying to place multiple resizable and draggable div's on one page that move (vertically) inside their own parent div. you can take a look at http://bit.ly/bCutBE However, these div's act really strange when I want to resize them, especially from the north side, they kind of move out of the screen very fast, while they shouldn't be able to get outside the parent div. I only want the div to be able to move and resize vertically inside it's parent, the dragging-part works pretty good, but the resize part give this problem. I can't really describe it better than this, but take a look for yourself and it will be clear immediately when you try to resize one of the coloured div's: move it a little downwards and try to resize it from the north side. the problem seems to be caused by the containment: 'parent', line of the resizable. when I delete this line it works fine, but then the coloured blocks don't stay in their parent, and I want them to stay inside their parent. I hope someone can help me with this... the jquery code I used: $(document).ready(function(){ $(".move") .draggable({ containment: 'parent', grid: [50,50], axis: 'y' }) .resizable({ containment: 'parent', grid: [50,50], handles: 'n, s', minHeight: 50 }); });

    Read the article

  • Surely eAsy but I am not able ... JQUERY UI - WIDGET - HEADER

    - by alex
    I was making this simple trial, but can anyone tell me why the distance from the border of DIV to the H2 header is so much ? How can I reduce it ? I don't want space ... Prova WIDGET <link rel="stylesheet" href="jquery-ui-1.8.custom/css/smoothness/jquery-ui-1.8.custom.css" type="text/css"> <link rel="stylesheet" href="jquery-ui-1.8.custom/development-bundle/ui/jquery-ui-1.8.custom.css" type="text/css"> <script src="jquery-ui-1.8.custom/development-bundle/jquery-1.4.2.js" type="text/javascript"></script> <script src="jquery-ui-1.8.custom/js/jquery-ui-1.8.custom.min.js" type="text/javascript"></script> <script type="text/javascript"> $(themify); function themify(){ $("div").addClass("ui-widget ui-widget-content ui-corner-all"); $("input").addClass("ui-button ui-button-text"); $(":header").addClass("ui-widget-header ui-corner-all"); //ui-widget } </script> <style>#test{display:none}</style> <script type="text/javascript"> function rendiVisibile(){ if(document.getElementById("test").style.display = "none"){ $("#test").css({"width":"200px","float":"right","text-align":"center"}); $("#test").show("slide",{},1000); } } </script> </head> <body> <h2>Tentativo widget con DIV</h2> <form action=""> <input type="button" value="Submit" id="pulsante" onclick="rendiVisibile()";><br/></br> <div id="test"> <h2>CIAO</h2> Un saluto </div> </form> </body>

    Read the article

  • jQuery sortable Div's

    - by kai lange
    is it possible to sort direct between two or more div's/boxe's and return the complete data (var order = ...) ? Online Demo: http://jsbin.com/alegu4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>jQuery Dynamic Drag'n Drop</title> <script type="text/javascript" src="http://cdn.jquerytools.org/1.2.5/jquery.tools.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.8/jquery-ui.min.js"></script> <style> body { font-family: Arial, Helvetica, sans-serif; font-size: 16px; margin-top: 10px; } ul { margin: 0; } #s1,#s2 { float: left; width: 400px; } #s1 li,#s2 li { list-style: none; margin: 0 0 4px 0; padding: 10px; background-color:#00CCCC; border: #CCCCCC solid 1px; color:#fff; } </style> <script type="text/javascript"> $(document).ready(function(){ $(function() { $("#s1 ul,#s2 ul").sortable({ opacity: 0.6, cursor: 'move', update: function() { var order = $(this).sortable("serialize") + '&action=updateRecordsListings'; //$.post("updateDB.php", order); alert(order); } }); }); }); </script> </head> <body> <div id="box"> <div class="box" id="s1"> <ul> <li id="recordsArray_1">1. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_2">2. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_3">3. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_4">4. Lorem ipsum dolor sit amet, consetetur</li> </ul> </div> <div class="box" id="s2"> <ul> <li id="recordsArray_5">5. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_6">6. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_7">7. Lorem ipsum dolor sit amet, consetetur</li> <li id="recordsArray_8">8. Lorem ipsum dolor sit amet, consetetur</li> </ul> </div> </div> </body> </html> Please note it's not the same like my other post - thanks!

    Read the article

  • jQuery show "loading" during slow operation

    - by The Disintegrator
    I'm trying to show a small loading image during a slow operation with jQuery and can't get it right. It's a BIG table with thousands of rows. When I check the "mostrarArticulosDeReferencia" checkbox it removes the "hidden" class from these rows. This operation takes a couple of seconds and I want to give some feedback. "loading" is a div with a small animated gif Here's the full code jQuery(document).ready(function() { jQuery("#mostrarArticulosDeReferencia").click(function(event){ if( jQuery("#mostrarArticulosDeReferencia").attr("checked") ) { jQuery("#loading").show(); //not showing jQuery("#listadoArticulos tr.r").removeClass("hidden"); //slow operation jQuery("#loading").hide(); } else { jQuery("#loading").show(); //not showing jQuery("#listadoArticulos tr.r").addClass("hidden"); //slow operation jQuery("#loading").hide(); } }); jQuery("#loading").hide(); }); It looks like jquery is "optimizing" those 3 lines jQuery("#loading").show(); //not showing jQuery("#listadoArticulos tr.r").removeClass("hidden"); jQuery("#loading").hide(); And never shows the loading div. Any Ideas? Bonus: There is a faster way of doing this show/hide thing? Found out that toggle is WAY slower. UPDATE: I tried this jQuery("#mostrarArticulosDeReferencia").click(function(event){ if( jQuery("#mostrarArticulosDeReferencia").attr("checked") ) { jQuery("#loading").show(); //not showing jQuery("#listadoArticulos tr.r").removeClass("hidden"); //slow operation setTimeout("jQuery('#loading').hide()", 1000); } else { jQuery("#loading").show(); //not showing jQuery("#listadoArticulos tr.r").addClass("hidden"); //slow operation setTimeout("jQuery('#loading').hide()", 1000); } }); That's what I get click on checkbox nothing happens during 2/3 secs (processing) page gets updated loading div shows up during a split second UPDATE 2: I've got a working solution. But WHY I have to use setTimeout to make it work is beyond me... jQuery("#mostrarArticulosDeReferencia").click(function(event){ if( jQuery("#mostrarArticulosDeReferencia").attr("checked") ) { jQuery("#loading").show(); setTimeout("jQuery('#listadoArticulos tr.r').removeClass('hidden');", 1); setTimeout("jQuery('#loading').hide()", 1); } else { jQuery("#loading").show(); setTimeout("jQuery('#listadoArticulos tr.r').addClass('hidden');", 1); setTimeout("jQuery('#loading').hide()", 1); } });

    Read the article

  • Loading jQuery plugin defaults from the server (AJAX)

    - by Pablo
    Im working on a private jQuery plugin in the following format: (function( $ ){ var defaults = {}; $.fn.cmFlex = function(opts) { this.each(function() { //Element specific options var o = $.extend({}, defaults, opts); //Code here }); //code Here }; })( jQuery ); How will i go on loading the default options from the server before $.cmFlex() is first called?

    Read the article

  • JSON and jQuery.ajax

    - by Andreas
    Hello, im trying to use the jQuery UI autocomplete to communitate with a webservice with responseformate JSON, but i am unable to do so. My webservice is not even executed, the path should be correct since the error message does not complain about this. What strikes me is the headers, response is soap but request is json, is it supposed to be like this? Response Headersvisa källkod Content-Type application/soap+xml; charset=utf-8 Request Headersvisa källkod Accept application/json, text/javascript, */* Content-Type application/json; charset=utf-8 The error message i get is as follows (sorry for the huge message, but it might be of importance): soap:ReceiverSystem.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlTextReader.Read() at System.Web.Services.Protocols.SoapServerProtocol.SoapEnvelopeReader.Read() at System.Xml.XmlReader.MoveToContent() at System.Web.Services.Protocols.SoapServerProtocol.SoapEnvelopeReader.MoveToContent() at System.Web.Services.Protocols.SoapServerProtocolHelper.GetRequestElement() at System.Web.Services.Protocols.Soap12ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message) at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) --- End of inner exception stack trace --- This is my code: $('selector').autocomplete({ source: function(request, response) { $.ajax({ url: "../WebService/Member.asmx", dataType: "json", contentType: "application/json; charset=utf-8", type: "POST", data: JSON.stringify({prefixText: request.term}), success: function(data) { alert('success'); }, error: function(XMLHttpRequest, textStatus, errorThrown){ alert('error'); } }) }, minLength: 1, select: function(event, ui) { } }); And my webservice looks like this: [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] [ScriptService] public class Member : WebService { [WebMethod(EnableSession = true)] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public string[] GetMembers(string prefixText) { code code code } } What am i doing wrong? Thanks in advance :)

    Read the article

  • Zendx JQuery Autocomplete

    - by emeraldjava
    I've been trying to get the Zend Jquery autocomplete function working, when i noticed this section in the Zend documentation. The following UI widgets are available as form view helpers. Make sure you use the correct version of jQuery UI library to be able to use them. The Google CDN only offers jQuery UI up to version 1.5.2. Some other components are only available from jQuery UI SVN, since they have been removed from the announced 1.6 release. autoComplete($id, $value, $params, $attribs): The AutoComplete View helper will be included in a future jQuery UI version (currently only via jQuery SVN) and creates a text field and registeres it to have auto complete functionality. The completion data source has to be given as jQuery related parameters 'url' or 'data' as described in the jQuery UI manual. Does anybody know which svn url tag or branch i need to download to get a javascript file with the autocomplete functions available in it? At the moment, my Bootstrap.php has $view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper'); $view->jQuery()->enable(); $view->jQuery()->uiEnable(); Zend_Controller_Action_HelperBroker::addHelper( new ZendX_JQuery_Controller_Action_Helper_AutoComplete() ); // Add it to the ViewRenderer $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer(); $viewRenderer->setView($view); Zend_Controller_Action_HelperBroker::addHelper($viewRenderer); In my layout, i define the jquery ui version i want <?php echo $this->jQuery() ->setUiVersion('1.7.2');?> Finally my index.phtml has the autocomplete widget <p><?php $data = array('New York', 'Tokyo', 'Berlin', 'London', 'Sydney', 'Bern', 'Boston', 'Baltimore'); ?> <?php echo $this->autocomplete("ac1", "", array('data' => $data));?></p> I'm using Zend 1.8.3 atm.

    Read the article

  • .post inside jQuery.validator.addMethod always returns false :(

    - by abdullah kahraman
    Hello! I am very new to jQuery and javascript programming. I have a program below that checks whether username is taken or not. For now, the PHP script always returns if(isset($_POST["username"]) )//&& isset($_POST["checking"])) { $xml="<register><message>Available</message></register>"; echo $xml; } Login function works, but username checking doesn't. Any ideas? Here is all of my code: $(document).ready(function() { jQuery.validator.addMethod("checkAvailability",function(value,element){ $.post( "login.php" , {username:"test", checking:"yes"}, function(xml){ if($("message", xml).text() == "Available") return true; else return false; }); },"Sorry, this user name is not available"); $("#loginForm").validate({ rules: { username: { required: true, minlength: 4, checkAvailability: true }, password:{ required: true, minlength: 5 } }, messages: { username:{ required: "You need to enter a username." , minlength: jQuery.format("Your username should be at least {0} characters long.") } }, highlight: function(element, errorClass) { $(element).fadeOut("fast",function() { $(element).fadeIn("slow"); }) }, success: function(x){ x.text("OK!") }, submitHandler: function(form){send()} }); function send(){ $("#message").hide("fast"); $.post( "login.php" , {username:$("#username").val(), password:$("#password").val()}, function(xml){ $("#message").html( $("message", xml).text() ); if($("message", xml).text() == "You are successfully logged in.") { $("#message").css({ "color": "green" }); $("#message").fadeIn("slow", function(){location.reload(true);}); } else { $("#message").css({ "color": "red" }); $("#message").fadeIn("slow"); } }); } $("#newUser").click(function(){ return false; }); });

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >