Search Results

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

Page 88/935 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • jQuery + Dialog Form Validation

    - by Panther24
    Hi, I have a jQuery Dialog form and on submit I'm trying to validate the fields. I'm using http://docs.jquery.com/Plugins/Validation to validate. In this I'm facing an issue, the validate function is not being called. I'm posting some snippet of my code $("#register-dialog-form").dialog({ autoOpen: false, height: 350, width: 450, modal: true, buttons: { 'Register': function() { $("#registerFrm").validate({ rules: { accountid: "required", name: { required: true, minlength: 5 }, username: { required: true, minlength: 5 }, password: { required: true, minlength: 5 } }, messages: { firstname: "Please enter your firstname", accountid: "Please enter the lastname", name: "Please enter a user friendly name", username: { required: "Please enter a username", minlength: jQuery.format("Enter at least {0} characters") }, password: { required: "Please provide a password", minlength: jQuery.format("Password must be at least {0} characters long") } } }); //****************** //TODO: Need to submit my form here //****************** $(this).dialog('close'); }, Cancel: function() { $(this).dialog('close'); } }, close: function() { //$('registerFrm').clearForm(); } }); Can someone please tell me what I'm doing wrong here. I've also tried to put the validation into $(document).ready(function() {}, but with no success. Here is the html code <div id="register-dialog-form" title="Register Account - Master" align="center" style="display: none"> <s:form name="registerFrm" id="registerFrm" action="registermaster" method="POST"> <table width="90%" border="0" class="ui-widget"> <tr> <td> <s:textfield label="Account Id" name="accountid" id="accountid" cssClass="text ui-widget-content ui-corner-all" /> </td> </tr> <tr> <td> <s:textfield label="Name" name="name" id="name" cssClass="text ui-widget-content ui-corner-all" /> </td> </tr> <tr> <td> <s:textfield label="Username" name="username" id="username" cssClass="text ui-widget-content ui-corner-all" /> </td> </tr> <tr> <td> <s:password label="Password" name="password" id="password" cssClass="text ui-widget-content ui-corner-all" /> </td> </tr> </table> </s:form> </div><!--End of RegisterAcc form-->

    Read the article

  • Has jQuery core development been slowing down?

    - by David Murdoch
    So, I regularly head over to jQuery's Commit History on GitHub just to read through the new code committed to jQuery core. But there hasn't been anything new committed since April 24th. I've already read through jQuery core a few times and I'm pretty familiar with it which is why I like reading the commits. I just like to see what changed, why it was changed, etc. Why has there been a slow down in jQuery commits on GitHub? Anyone else have some recommendations for where I can go to view good javascript code being developed? My motive for reading jQuery's commit history is similar to the reasons I browse through accepted answers here on stackoverflow - to learn from people smarter than me. With that said, I am interested in the answer to this questions title, but I am more interested in finding a substitute to reading the jQuery commits.

    Read the article

  • jQuery: How to stop propagation of a bound function not the entire event?

    - by Dale
    I have a click function bound to many elements. It is possible that sometimes these elements may sit within one another. So, the click event is bound to a child and also bound to its parent. The method is specific to the element clicked. Naturally, because of event bubbling, the child's event is fired first, and then the parents. I cannot have them both called at the same time because the parents event overwrites the event of the child. So I could use event.stopPropagation() so only the first element clicked receives the event. The problem is that there are other click events also attached to the element, for example, I am using jQuery's draggable on these elements. If I stop the propagation of the click event, then draggable doesn't work, and the following click events are not called. So my question is: Is there a way to stop the event bubbling of the method the event will call and not the entire event?

    Read the article

  • JQuery UI Tabs widget error handling

    - by dthrasher
    When an ajax request fails, the JQuery UI Tabs widget stops responding and the "Loading..." spinner remains on the tab that caused the error. I can get the ajax callback to give me some sort of alert message like so: $('#localtabs > ul').tabs({ ajaxOptions: { success: tabLoadSuccessCallback, error: tabLoadFailureCallback} }); function tabLoadSuccessCallback(XMLHttpRequest, textStatus, errorThrown) { alert("Yay!");} function tabLoadFailureCallback(XMLHttpRequest, textStatus, errorThrown) { alert("Could not get search results.");} But what I'd really like is to be able to display a message within the panel, cancel the spinner, and disable the tab that caused the problem while leaving the rest of the tabs operational. Does anyone have any ideas for how to do this?

    Read the article

  • jquery validation plugin - different treatment for display errors vs. clearing errors

    - by RyOnLife
    I am using the popular jQuery Validation Plugin. It's very flexible with regards to when validations are run (onsubmit, onfocusout, onkeyup, etc.). When validations do run, as appropriate, errors are both displayed and cleared. Without hacking the plugin core, I'd like a way to split the behavior so: Errors are only displayed onsubmit But if the user subsequently enters a valid response, errors are cleared onsubmit, onfocusout, etc. Just trying to create a better user experience: Only yell at them when they submit, yet still get the errors out of their face as soon as possible. When I ran through the options, I didn't see the callbacks necessary to accomplish this. I'd like to make it work without having to hack the plugin core. Anyone have some insights? Thanks.

    Read the article

  • jQuery is not defined

    - by dole
    Hi there, I have to use an external js file, in which I load the jquery. My js file look like this: document.write('<script language="javascript" type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script>'); (function($) { $(document).ready(function() { alert('it works!!'); }); })(jQuery); On the firefox console I get the "jQuery is not defined" and I think it is because the jQuery library is loaded after the $ function from my js file. Do you have any idea about how can I fix this? If I run the script from the FF console all works fine.

    Read the article

  • how to make a div(black border,and on the google-maps) panel drop-disable,thanks

    - by zjm1126
    the black div is used to panel,so it can not be droppable. <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width,minimum-scale=0.3,maximum-scale=5.0,user-scalable=yes"> </head> <body onload="initialize()" onunload="GUnload()"> <style type="text/css"> *{ margin:0; padding:0; } .container{ padding:10px; width:50px; height:50px; border:5px solid black; } </style> <!--<div style="width:100px;height:100px;background:blue;"> </div>--> <div id="map_canvas" style="width: 500px; height: 300px;"></div> <!-- <div class=b style="width: 20px; height: 20px;background:red;position:absolute;left:700px;top:200px;"></div> <div class=b style="width: 20px; height: 20px;background:red;position:absolute;left:700px;top:200px;"></div> <div class=b style="width: 20px; height: 20px;background:red;position:absolute;left:700px;top:200px;"></div> <div class=b style="width: 20px; height: 20px;background:red;position:absolute;left:700px;top:200px;"></div> <div class=b style="width: 20px; height: 20px;background:red;position:absolute;left:700px;top:200px;"></div> --> <script src="jquery-1.4.2.js" type="text/javascript"></script> <script src="jquery-ui-1.8rc3.custom.min.js" type="text/javascript"></script> <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA-7cuV3vqp7w6zUNiN_F4uBRi_j0U6kJrkFvY4-OX2XYmEAa76BSNz0ifabgugotzJgrxyodPDmheRA&sensor=false"type="text/javascript"></script> <script type="text/javascript"> var aFn; //********** function initialize() { if (GBrowserIsCompatible()) { //************ function a() { } a.prototype = new GControl(); a.prototype.initialize = function(map) { var container = document.createElement("div"); var a=''; for(i=0;i<5;i++){ a+='<div class=b style="width: 20px; height: 20px;background:red;position:absolute;"></div>' } $(container).addClass('container'); $(container).droppable( 'destroy' ).css('z-index','2700') $(map.getContainer()).append($(container).append(a)); return container; } a.prototype.getDefaultPosition = function() { return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(7, 7)); } //************ var map = new GMap2(document.getElementById("map_canvas")); map.addControl(new a()); var center=new GLatLng(39.9493, 116.3975); map.setCenter(center, 13); aFn=function(x,y){ var point =new GPoint(x,y) point = map.fromContainerPixelToLatLng(point); //console.log(point.x+" "+point.y) map.addOverlay(new GMarker(point)); } $(".b").draggable({}); $("#map_canvas").droppable({ drop: function(event,ui) { //console.log(ui.offset.left+' '+ui.offset.top) aFn(ui.offset.left+10,ui.offset.top+10); ui.draggable.remove(); } }); } } //************* </script> </body> </html>

    Read the article

  • Jquery slider with gradscales

    - by Karthik
    hi folks I am using this jquery ui for the slider.here i want the gradscale like poor----excellecnt-------average------good how do this in this script? <script src="../../Scripts/jquery.ui.core.js" type="text/javascript"></script> <script src="../../Scripts/jquery.ui.widget.js" type="text/javascript"></script> <script src="../../Scripts/jquery.ui.mouse.js" type="text/javascript"></script> <script src="../../Scripts/jquery.ui.slider.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { $("#slider").slider(); }); </script>

    Read the article

  • jquery ui dialog - live not working?

    - by ile
    I'm using this dialog: http://docs.jquery.com/UI/Dialog To open dialog I do it this way: $('a.openModal').live("click", function() { var idArr = $(this).attr('id').split("OpenNote"); var id = idArr[1]; alert($(".modalNote#dialog-modal" + id).html()); $(".modalNote#dialog-modal" + id).dialog('open'); return false; }); This dialog is used to display content of note when title is clicked. When I generated html on pageload, then this works fine, but if I add html dynamically then dialog won't open. It is also not hidden when it's appended to div. Is it possible to open it "on-fly"?

    Read the article

  • How to get jQuery animateNumber to pull value dynamically?

    - by mcography
    I am trying to implement jQuery animateNumber, and I have it working like the demo just fine. However, I want to modify it so that it pulls the number from the HTML, rather than setting it in the script. I tried the following, but it just shows "NAN." What am I doing wrong? <div class="stat-title animate-number">$16,309</div> <script> $('.animate-number').each(function(){ var value = new Number; // Grab contents of element and turn it into a number value = $(this).text(); value = parseInt(value); // Set the starting text to 0 $(this).text('0'); $(this).animateNumber( { number: value, }, 1000 ) }); </script>

    Read the article

  • jQuery dialog box not opening 2nd time

    - by Steven
    I found this thread which basically has the same issue I have. But their solution is not working for me. The dialog appears the first time I click the submit button, but not the 2nd time. I'm opening the dialog box after a form submission. UPDATE I finally got it working. Here is the correct code: if (jQuery('#registrationforms').length > 0) { //instantiate the dialog jQuery("#dialog").dialog({ modal:true, autoOpen:false }); //Some more code here to call processRegistration function. } function processRegistration(instanceID, formData) { jQuery.post("mypath/jquery_bll.php", { instance: 'processRegistration', formData : formData, instanceID : instanceID }, function(feedback) { jQuery('#dialog').text(feedback.message); jQuery('#dialog').parent().addClass(feedback.type); jQuery('#dialog').dialog('open'); },"json"); } Since I'm dynamically applying css class, I have to make sure to add it to the outer DIV which $.dialog creates to wrap my 'dialog' DIV.

    Read the article

  • Non-CDN hosted jQuery caused some strange behaviour

    - by kwokwai
    Hi all, I was using this JQuery in this download link, and included it in the head tag of a HTML web page: <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> In a php web page, I got these few lines of codes: $.ajax({ url: 'http://mywebsite.com/site1/toavail/, type: "post", success: function(data) { // some more code here } }); When I tested the HTML page in IE 6, and 7, I saw the same warning message: "permission denied" When I tested it in Firefox 3, nothing was returned from the server web page. Later, I changed the JQuery source link to be: http://code.jquery.com/jquery-1.4.2.js I refreshed the web page, and I could saw the returned value then.

    Read the article

  • jquery ui autcomplete does not disapper with no result

    - by mike
    Hi, I'm using jquery ui autocomplete with the following code: $('#company').autocomplete({ source: function(request, response) { var company_name = $('#company').val(); $.ajax({ type: 'post', url: 'http://new.admin.localhost/client/helper/lookup_company_name', cache: false, data: { company : company_name }, dataType: 'json', success: function(data) { //alert(data); response($.map(data.companies, function(item) { return { label: item.company, value: item.company } })) } }) }, minLength: 2, }); This works as expected... The problem is, if the first few chars match something and then you enter a char that should "break" any match, it just keeps the drop down in place with the results for the last matched char... make sense? Would this be something I needed to change in the script that returns the data or something in the jquery? thanks!

    Read the article

  • jquery load function problem

    - by andrew
    Hi, i have a select box like that <select name="sehirler_post" id="sehirler_post"> i am getting values via jquery. i know two different ways to get values. first one is : var sehirler_post = jQuery('select#sehirler_post').attr('value'); second one is: jQuery('#sehirler_post ').val() and finally here is my problem, i have something like this: jQuery("#okay").load("ajax_post_category.php?okay="+id+""); i would like to use selectbox value instead of id (okay="+id+"). so, i must change +id+ part with select box value. however i can not do it.. i tried to do like that: jQuery("#okay").load("ajax_post_category.php?okay="+jQuery('#sehirler_post').val()+""); it did not work. there must be a way, so i can use selectbox value instead of id in my load function. if anyone helps me, ill be so glad. regards

    Read the article

  • Java Swing UI Changing Method

    - by vigilant
    I would like to use Swing to program a simple learning game. I am wondering what would be best way to switch between UI screens. For example, I would have a screen for the Main Menu, and then when the user presses a button on that screen, I would swap out the whole screen for a completely different one. Then, arbitrary screens can be swapped in at any moment, and all of their event handlers would be reactivated while the inactive screen's event handlers will be deactivated. What type of Swing component/control would I use for each of the 'screens'. Is this even doable?

    Read the article

  • Jquery ui autocomplete different source

    - by voidnull
    Hi i try to use jquery ui autocomplete. I have different autocomplete field in one page and i need to get data with different sources (different url) depend to wich autocomplete field is used. i know how can i get the typed data (request.term), but i cant find the way to get the selected field ID. $(".ac").autocomplete({ source: function(request, response) { id = '??? the actually used field #id ???'; $.ajax({ type: "POST", url: "/admin_/sql/autocomplete/"+id, data: "test=...", async: false, success: function(data) { } }); }, search: function() { // }, focus: function() { // return false; }, select: function(event, ui) { // return false; } });

    Read the article

  • Can jQuery perform a compound select against the top level only?

    - by harpo
    Basically, is there a way to write a.children('.outer').children('.inner') without the intermediate selector? I can't write $('.outer > .inner', a) because I don't want to do full-depth search against a — I know that the .outer elements are immediate children of a. It's partly a matter of "elegance", but partly because I'm trying to avoid "throwaway" element sets. Yes, jQuery may in effect do the same thing, but it has a better chance of optimizing (at least in theory), when it knows the full query's intent.

    Read the article

  • non-CDN Hosted jQuery caused strange some behaviour

    - by kwokwai
    Hi all, I was using this JQuery in this download link, and included it in the head tag of a HTML web page: <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> In a php web page, I got these few lines of codes: $.ajax({ url: 'http://mywebsite.com/site1/toavail/, type: "post", success: function(data) { // some more code here } }); When I tested the HTML page in IE 6, and 7, I saw the same warning message: "permission denied" When I tested it in Firefox 3, nothing was returned from the server web page. Later, I changed the JQuery source link to be: http://code.jquery.com/jquery-1.4.2.js then I refreshed the web page, and I could saw the returned value.

    Read the article

  • What technology for a rich UI desktop application ?

    - by Ale_x
    For an internship, I'm gonna have to develop a desktop application. The focus is creating a rich UI ( cool effects, sound etc ). Which tech should I go with ? - Flash ? ( in this case, shoud I go with a flex project ? AIR ? what is the gain between this and a simple raw flash project ) - C#/Silverlight ? Any other possibility ? If experienced developers could give their advice, that would be great thanks.

    Read the article

  • Jquery - How to make $.post() use contentType=application/json?

    - by JK
    I've noticed that when using $.post() in jquery that the default contentType is application/x-www-form-urlencoded - when my asp.net mvc code needs to have contentType=application/json (See this question for why I must use application/json: http://stackoverflow.com/questions/2792603/aspnet-mvc-why-is-modelstate-isvalid-false-the-x-field-is-required-when-that) How can I make $.post() send contentType=application/json? I already have a large number of $.post() functions, so I don't want to change to $.ajax() because it would take too much time If I try $.post(url, data, function(), "json") It still has contentType=application/x-www-form-urlencoded. So what exactly does the "json" param do if it does not change the contenttype to json? If I try $.ajaxSetup({ contentType: "application/json; charset=utf-8" }); That works but affects every single $.get and $.post that I have and causes some to break. So is there some way that I can change the behavior of $.post() to send contentType=application/json?

    Read the article

  • Client validate non-model bound checkbox while using MVC 2 jQuery Validation

    - by Justin Saraceno
    Have: Using ASP.NET MVC 2, DataAnnotationsModel based server validation, and client validation with jQuery. Anything in my model is validated perfectly on the client with jQuery based validation (jQuery.validate and MicrosoftMvcJQueryValidation.js). Need: Adding an additional HTML <input type="checkbox" id="terms" /> to my form. I need jQuery validation to require that this checkbox is checked AND somehow hook it in with whatever jQuery client script MVC is automagically controlling. Yes, I know it won't validate on the server side, but I don't need or want it to. Seems like it should be simple but I'm new to MVC, a total beginner at jQuery, and my searches have been coming up blank. Any help would be appreciated!

    Read the article

  • How can I select the first child of all the children of a jQuery object?

    - by sawa
    I have a <tr> which includes several <td>s, each of which includes exactly one <div>, which may have further structure: <tr id="foo"> <td><div>...</div></td> <td><div>...</div></td> ... <td><div>...</div></td> </tr> Given a jQuery selector obj = $('#foo'), how can I get a selector that points to all the <div>s directly under a <td> under the <tr> (but nothing within the <div>s)? Probably chldren() and/or find() may be relevant, but I am not sure.

    Read the article

  • Can't type anything in inputs or textareas

    - by dev reactive.by
    Hello, I have a problem: I've add a Jquery UI drag-n-drop widget to my page, but after that I can't type anything into inputs or textareas. I use jQuery 1.4.2 and jQuery UI 1.8rc3, and tiny_mce for convert textareas into WYSIWUG editor (I've tried to disable tiny_mce). When I put $("input").click( function(){ alert('clicked!'); }); - it's working(I have an alert). When I get focused to any input I even can't refresh page by F5 and go to the next element by Tab key. There's a page: http://cms.reactive.by/test.htm (click to clip2net.com/clip/m7787/1269022358-clip-3kb.png to see that jQuery UI is workong) And yes.. there's no errors in FireBug. I hope You can help me to understand what's wrong with this code.

    Read the article

  • Pulling .live() functionality out of jQuery

    - by Daniel
    I am writing a Firefox Add-On that currently is depending on jQuery for the following things: Selectors Animations A special .live("focus") hail-mary event-catching maneuver that happens to work with jQuery 1.4.2 (but not 1.4.4) jQuery isn't well suited for functioning inside XUL, and it's a miracle we've gotten this far with it. We're trying to remove the jQuery requirements, the first two are easy (animations are simple, and we can use .querySelector() instead of jQuery), but the .live has proven impossible to do on our own. I've tried reading the source code, but I haven't been able to piece it apart. What is the jQuery .live function doing? There's clearly a lot more going on than document.addEventListener("focus"/"focusin",function_to_pick_apart_events). What else is going on here?

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >