Search Results

Search found 23364 results on 935 pages for 'jquery ui droppable'.

Page 42/935 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • jQuery-AJAX to rebind dropdown list to results from stored procedure

    - by webworm
    I have a dropdown list of peoples names that is quite long. As many as 2,000 names. I would like to make it easier to find the name the user is interested in by limiting the dropdown list to a subset of names at a time. I have done this by creating a series of 26 links (A, B, C ... Z) that call a method in the code behind that populates the dropdown list with only those names starting with the letter the user clicked. This all works well but I would like to be able to use AJAX to accomplish this update of the dropdown list without a page refresh. I would like to use jQuery for the AJAX functionality rather than ASP.NET AJAX. My problem is I am not sure how to execute the stored procedure and then "rebind" the dropdown list with the new dataset via jQuery AJAX. Any suggestions or resources that might provide and example or walk-through? Thank you.

    Read the article

  • table cell background color change problem

    - by Mellon
    I work on another guy's code, and I try to change the table cell background color when mouse over the cell, and change back to the original background color when mouse leave. I use the following code: var bgcolor=$(".cell-el").css("background-color") $(".cell-el").hover( function(){ $(this).css("background-color", "#3c3c36")}, //mouse enter, bg-color change function(){ $(this).css("background-color", bgcolor) // mouse leave, bg-color change back }) Things are working fine, EXCEPT that when mouse first time enter the cell, the cell background color is not changed to "#3c3c36", but when mouse leave the cell after first entering and enter in the cell again, the cell's background color changed to "#3c3c36". That's the cell color never change for mouse first enter, after that, everything is working great. What's could be the cause of this problem?

    Read the article

  • Get jQuery Error if PHP Breaks

    - by Norbert
    I have a PHP script that breaks if a variable is not populated and it isn't added to the database, but jQuery handles this as a success and I get this error: TypeError: Result of expression 'data' [null] is not an object. Here's the jQuery script: $.ajax({ type: "POST", url: "/clase/do-add", data: $("#adauga").serialize(), dataType: "json", error: function (xhr, textStatus, errorThrown) { alert('Try again.'); }, success: function(data) { var dlHTML = '<dl id="' + data.id + '"> [too long] </dl>'; $('form#adauga').after(dlHTML); $('#main dl:first').hide().fadeIn(); adaugaClasaSubmit.removeAttr('disabled'); adaugaClasa.removeAttr('readonly'); adaugaClasa.val("").focus(); } });

    Read the article

  • make jquery animation faster

    - by darkandcold
    Hello, while loading a page i am using a animation, wid=jQuery(window).width()+400; jQuery('#div').animate({'marginLeft' : '+='+wid+'px'},{queue:false, duration:20000 }) div, is being moved to left in 20 sec. I use this animation for loading page. when page is loaded <body onload=myfunction()> is called. when myfunction is called (page is loadad completly) i want to my animation faster. how to change an animation duration while it's animating?

    Read the article

  • jQuery live() and stopPropagation() issue

    - by colourandcode
    I know that the live() event handles event bubbling different than all other jQuery events. jQuery recommends using 'return false', but in my case that doesn't work. The issue is: I have a DIV which contains an anchor tag. The DIV is bound using live(). Whenever I click the anchor tag inside this DIV it bubbles and calls the DIV's event. If I bind an event to that A tag which returns false it prevents the link from opening. Neither stopPropagation() or return false work in this case. Are there any other options? Ideally I'd like to keep the live() event around.

    Read the article

  • JQuery: show div on radiobutton select

    - by nav
    Hi, I am trying to use JQuery to show a div when the user selects a particular radio button (Other) within a radiobutton group. The html is below <div id="countries"> <input id="Washington_D.C" TYPE="RADIO" NAME="location" VALUE="Washington">Washington D.C</input> <input id="Other" TYPE="RADIO" NAME="location" VALUE="">Other</input> <div id="other locations" style="display: none"> </div> </div> Using the JQuery code: $(document).ready(function(){ $("radio[@name='location']").change(function(){ if ($("radio[@name='location']:checked").val() == 'Other') $("#county_drop_down").show(); }); }); But its not showing the div 'other locations' when I select the radiobutton'Other'....

    Read the article

  • jQuery Upload Progress Plugin Not working in Chrome and Safari

    - by Conceited Code
    I am using the jquery.uploadprogress plugin to get the upload progress of a file from the NginxHttpUploadProgressModule. This is inside an iframe for a facebook application. It works in firefox, but it fails in chrome/safari. When I open the console I get this. Uncaught ReferenceError: progressFrame is not defined jquery.uploadprogress.js:80 Any idea how I would fix that? I would like to also send the file using AJAX when it is completed. How would I implement that? EDIT: I need this soon and it is important so I am going to put a 100 point bounty on this question. The first person to answer it will receive the 100 points. EDIT 2: Jake33 helped me solve the first problem. First person to leave a response with how to send the file with ajax too will receive the 100 points.

    Read the article

  • jQuery - Slideshow with different sized images and text

    - by NicoJuicy
    I need some sort of slideshow, with text (something like moving boxes would be nice). I have tried several, but i'm always having problems with different sized images (the images can be for eg. 500px x 300px, but the next one can be 500px, 300px), this gives some problems with the pictures ... I hope you understand what i mean. It's very irritating to find a good jquery plugin that can deal with this problem... :( Can anyone find me a good working one or an alternative to jQuery?

    Read the article

  • jQuery AJAX get request - cannot see returned data

    - by Wes
    I think I am missing something obvious here, but I can't figure it out. I expect the following HTML to alert a response from the server. But, the alert is empty. I can see in Wireshark that the expected response is coming back to me from the server. Why is it not populated in the data variable? <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> </head> <body> <script type="text/javascript"> $.get("http://www.geocommunicator.gov/TownshipGeocoder/TownshipGeocoder.asmx/GetTRS", {'Lat': 41, 'Lon': -93, 'Units': 'eDD', 'Datum': ''}, function(data) { alert('data:'+data); }); </script> </body> </html>

    Read the article

  • IE browser caching and the jQuery Form Plugin

    - by Harfleur
    Like so many lost souls before me, I'm floundering in the snake pit that is Ajax form submission and IE browser caching. I'm trying to write a simple script using the jQuery Form Plugin to Ajaxify Wordpress comments. It's working fine in Firefox, Chrome, Safari, et. al., but in IE, the response text is cached with the result that Ajax is pulling in the wrong comment. jQuery(this).ajaxSubmit({ success: function(data) { var response = $("<ol>"+data+"</ol>"); response.find('.commentlist li:last').hide().appendTo(jQuery('.commentlist')).slideDown('slow'); } }); ajaxSubmit sends the comment to wp-comments-post.php, which inelegantly spits back the entire page as a response. So, despite the fact that it's ugly as toads, I'm sticking the response text in a variable, using :last to isolate the most recent comment, and sliding it down in its place. IE, however, is returning the cached version of the page, which doesn't include the new comment. So ".commentlist li:last" selects the previous comment, a duplicate of which then uselessly slides down beneath the original. I've tried setting "cache: false" in the ajaxSubmit options, but it has no effect. I've tried setting a url option and tacking on a random number or timestamp, but it winds up being attached to the POST that submits the comment to the server rather than the GET that returns the response, and so has no effect. I'm not sure what else to try. Everything works fine in IE if I turn off browser caching, but that's obviously not something I can expect anyone viewing the page to do. Any help will be hugely appreciated. Thanks in advance! EDIT WITH A PROGRESS REPORT: A couple of people have suggested using PHP headers to prevent caching, and this does indeed work. The trouble is that wp-comments-post is spitting back the entire page when a new comment is submitted, and the only way I can see to add headers is to put them in the Wordpress post template, which disables caching on all posts at all times--not quite the behavior I'm looking for. Is there a way to set a php conditional--"if is_ajax" or something like that--that would keep the headers from being applied during regular pageloads, but plug them in if the page was called by an Ajax GET?

    Read the article

  • Using Jquery to add items in Listbox from Textbox

    - by Pratik Gupta
    I am stuck somewhere using jquery to append the list box from a text box. here is my jquery $("#btnAddSvc").click(function () { var svc = $("#<%= txtServiceName.ClientID %>").val(); //Its Let you know the textbox's value svc.appendTo("#<%=lstSvcName.ClientID %>"); }); I am using asp.net (c#) to develop my code <asp:Button ID="btnAddSvc" runat="server" Text=">>" Font-Size="Medium" /> <asp:ListBox ID="lstSvcName" runat="server" SelectionMode="Multiple" ToolTip="Selected Service Names" Width="169px"></asp:ListBox> can someone please help as i am not able to get the values in list box.

    Read the article

  • Making a jQuery plugin work on all objects

    - by Jon Winstanley
    I am using the jQuery physics plugin for a pet project I am working on. The plugin enables the moving of DOM objects in realistic ways using velocity, gravity, wind etc. However I want to use the plugin to calculate where objects are to be placed inside a canvas element, not DOM objects. How do I change the plugin script functions to work on any object with 'top' and 'left' properties rather than only working with DOM objects: Currently the script functions look like this: jQuery.fn.funname = function() { return this; };

    Read the article

  • How to clean completly select2 control?

    - by Candil
    I'm working with the awesome select2 control. I'm trying to clean and disable the select2 with the content too so I do this: $("#select2id").empty(); $("#select2id").select2("disable"); Ok, it works, but if i had a value selected all the items are removed, the control is disabled, but the selected value is still displayed. I want to clear all content so the placeholder would be showed. Here is a example I did where you can see the issue: http://jsfiddle.net/BSEXM/ HTML: <select id="sel" data-placeholder="This is my placeholder"> <option></option> <option value="a">hello</option> <option value="b">all</option> <option value="c">stack</option> <option value="c">overflow</option> </select> <br> <button id="pres">Disable and clear</button> <button id="ena">Enable</button> Code: $(document).ready(function () { $("#sel").select2(); $("#pres").click(function () { $("#sel").empty(); $("#sel").select2("disable"); }); $("#ena").click(function () { $("#sel").select2("enable"); }); }); CSS: #sel { margin: 20px; } Do you have any idea or advice to this?

    Read the article

  • jquery - lose click() event after ajax call???

    - by niczoom
    At the following webpage liamharding.com/pgi.php I have an option panel on the left side of the page which opens and closes upon clicking the panels 'arrow', this works fine until you select a market (for testing use one of the 'Random Walk' markets and click 'Show/Refesh Graphs'), this then makes an ajax call using get_graph(forexName, myCount, divIsNew) function. Once this call is completed a graph(s) is displayed and then my options panels click() event does not work? The ajax call returns the data in a variable ajax_data, the problem happens when I perform the following code var jq_ajax_data = $("<div/>").html(ajax_data); . I need to wrap it in a so I can extract data from it using jQuery. If this line of code is commented out the click() event works fine ?? Hope somebody can help, I have spent a lot of time but cant find what the problem is.

    Read the article

  • jQuery event trigger - cancelable event

    - by Dismissile
    I have created a jquery plugin which is triggering an event: $.fn.myplugin = function(options) { this.on("foo.myplugin", options.foo); this.on("bar.myplugin", options.bar); }; I want to check if foo has been canceled by a user and prevent bar from being triggered: // trigger foo this.trigger("foo.myplugin"); // how do I check if foo was canceled if( !fooCanceled ) { this.trigger("bar.myplugin"); } How can I check if foo was canceled to prevent bar from being triggered? jQuery UI does something similar to this, but it did not work when I tried: if (this._trigger("search", event) === false) { return; } I tried something similar to this: if( this.trigger("foo.myplugin") === false ) { return; } this.trigger("bar.myplugin"); But bar was still being triggered.

    Read the article

  • customise jQuery totemticker plugin

    - by Don
    I'm using the totemticker jQuery plugin, but need to be able to stop it programatically. It doesn't seem to provide this feature, so I had a look at the source code to see if I could add it myself. It seems that all I need to do is figure out how to call base.stop_interval() However, I can't seem to make the object that is stored in base accessible to callers. I've made a couple of unsuccesful atttempts, but hopefully someone who knows a bit more about how jQuery plugins work can point me in the right direction.

    Read the article

  • Displaying the error message from web service in jquery validation custom method

    - by Mrt
    Hello, I'm adding a custom method to jquery validation that calls a webservice, but the web service returns more then just a boolean. Is it possible to show the error based on return call of the web service. e.g. say I want an email address to be valid & not in use, so my web service checks this an returns 0 - ok, 1 - not valid, 2 - in use. How can I get jquery to show to correct error message based in the response ?

    Read the article

  • jQuery Form plugin - no data from file upload?

    - by pojo
    I've been struggling a bit with the jQuery Form plugin. I want to create a file upload form that posts the data (JSON, from the chosen file) into a REST service exposed by a servlet. The URL for the POST is calculated from what the user chooses in a SELECT dropdown. When the upload is complete, I want to notify the user immediately, AJAX-style. The problem is that the POST header has a Content-Length of 0 and contains no data. I would appreciate any help! <html> <head> <script type="text/javascript" src="js/jquery-1.4.2.min.js">/* ppp */</script> <script type="text/javascript" src="js/jquery.form.js">/* ppp */</script> <script type="text/javascript"> function cb_beforesubmit (arr, $form, options) { // This should override the form's action attribute options.url = "/rest/services/" + $('#selectedaction')[0].value; return true; } function cb_success (rt, st, xhr, wf) { $('#response').html(rt + '<br>' + st + '<br>' + xhr); } $(document).ready(function () { var options = { beforeSubmit: cb_beforesubmit, success: cb_success, dataType: 'json', contentType: 'application/json', method: 'POST', }; $('#myform').ajaxForm(options); $.getJSON('/rest/services', function (data, ts) { for (var property in data) { if (typeof property == 'string') { $('#selectedaction').append('<option>' + property + '</option>'); } } }); }); </script> </head> <body> <form id="myform" action="/rest/services/foo1" method="POST" enctype="multipart/form-data"> <!-- The form does not seem to submit at all if I don't set action to a default value? !--> <select id="selectedaction"> <script type="text/javascript"> </script> </select> <input type="file" value="Choose"/> <input type="submit" value="Submit" /> </form> <div id="response"> </div> </body> </html>

    Read the article

  • Cloning a selector + all its children in jQuery?

    - by HipHop-opatamus
    I'm having trouble getting the following JQuery script to function properly - its functionality is as follows: 1) Hide the content below each headline 2) Upon clicking a headline, substitute the "#first-post" with the headline + the hidden content below the headline. I can only seem to get the script to clone the headline itself to #first-post, not the headline + the content beneath it. Any idea why? <HTML> <HEAD> <script src="http://code.jquery.com/jquery-latest.js"></script> </HEAD> <script> $(document).ready( function(){ $('.title').siblings().hide(); $('.title').click( function() { $('#first-post').replaceWith($(this).closest(".comment").clone().attr('id','first-post')); $('html, body').animate({scrollTop:0}, 'fast'); return false; }); }); </script> <BODY> <div id="first-post"> <div class="content"><p>This is a test discussion topic</p> </div> </div> <div class="comment"> <h2 class="title"><a href="#1">1st Post</a></h2> <div class="content"> <p>this is 1st reply to the original post</p> </div> <div class="test">1st post second line</div> </div> <div class="comment"> <h2 class="title"><a href="#2">2nd Post</a></h2> <div class="content"> <p>this is 2nd reply to the original post</p> </div> <div class="test">2nd post second line</div> </div> </div> <div class="comment"> <h2 class="title"><a href="#3">3rd Post</a></h2> <div class="content"> <p>this is 3rd reply to the original post</p> </div> <div class="test">3rd post second line</div> </div> </div> </BODY> </HTML>

    Read the article

  • Problem for opening jQuery dialog box in ie8

    - by user291247
    Hello, I am using jQuery dialog box and having problem to open it in ie8 in other browsers it will opens but having problem in ie8 only. Also I have one more problem some times ajax request is not working in my dialog box on any browser. code. // Dialog $('#login_div').dialog({ autoOpen: false, width: 600, buttons: { "Cancel": function() { $(this).dialog("close"); } } }); // Dialog Link - login_div $('#dialog_link').click(function(){ $('#login_div').dialog({ autoOpen: false }); //$('#login_div').show(); $('#login_div').dialog('open'); return false; });

    Read the article

  • JQuery overlay - issues with opening twitter "Allow Access" box

    - by Gublooo
    Hey guys I'm using Jquery flowplayer tools overlay to open external links. External links are working fine with this piece of code shown in the link: http://www.demiseonline.com/misc/Iframeoverlay.html Now using this overlay - I wanted to open the twitter dialog which asks users to Allow access to their account. So in the code below, I replaced http://www.google.com with https://twitter.com/oauth/authenticate?oauth_token=VPVRIsnRz9IX4CAab7brert3jHiEs <div class="apple_overlay black" id="Overlay1" <iframe src ="http://www.google.com" width="100%" height="595px" frameborder="0" </iframe </div When I replace the code, as soon as I load the page, even before I click on the link to open the overlay - the page gets redirected to the twitter URL. Any idea why that happens for this URL. Thanks

    Read the article

  • jQuery drag and drop behavior with partially transparent image

    - by Aaron
    I'm trying to develop a drag-and-drop behavior based on the jQuery UI draggable behavior but am running into some road blocks. I want to be able to drag several images with transparent regions around a region of the screen. I want the user to be able to drag the image he clicks and not just whatever draggable div or PNG happens to be z-indexed on top. The below image is a screen grab from my test page. If I click the lower left region of the blue square through the red thing I should drag the square and not the red thing. The red thing is what gets dragged though because it is on top and the browser does not care about the transparency. My question is, how can I make it behave as expected in this situation and drag the square instead? Edit: Seems I can't attach images as a new user. See this URL for my example image: http://i42.tinypic.com/r1g4sk.png

    Read the article

  • Client validation of INPUT of type FILE without postback using jQuery

    - by Fixer
    I want to check on the client side that a file has been selected before the form can be submitted. <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> @using (Html.BeginForm("Upload", "Files", FormMethod.Post, new { enctype = "multipart/form-data" })) { <input id="File" name="File" type="file" size="80" /> <input type="submit" name="name" value="Upload" /> } Currently this form is doing postbacks for validation. What is going wrong?

    Read the article

  • jquery-ui icons

    - by cf_PhillipSenn
    I understand that if I use this: <script src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1"); google.load("jqueryui", "1"); </script> <span class="ui-icon ui-icon-arrowthick-1-n"></span> Then an arrow appears. I don't understand how to wrap the arrow with this: ui-state-default ui-corner-all because themeroller is using list items, and I'm using table head cells. I don't want to use: <th class="ui-state-default ui-corner-all"> because that highlights the entire cell.

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >