Search Results

Search found 17637 results on 706 pages for 'jquery autocomplete'.

Page 22/706 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • How do I keep child elements together with parent jQuery sortable.

    - by unknowndomain
    I have a list of items like this... <ol> <li> <span></span> <img src="image.png" /> <p>Image Caption</p> </li> </ol> And I want to be able to sort the LI's but not the sub elements, they should just move with their parent. I am using the jQuery to do that... $('ol li').sortable({ 'cursor': 'move' }); And its working but not moving the whole lot just the element you clicked i.e. the <p>, <img> or <span> I can't figure out how to solve this so I looked about and found an option called 'items': '> li' which was recommended but upon using this nothing drags any more but using firebug + jquery plugin I can see there is a sortable on the <li> still. Not sure what to do, example here: http://clareshilland.unknowndomain.co.uk/ Press ctrl+l to login. Enter the login details: Username: clarePassword: demo Select 'edit' from under then 'image' portion of the menu. The sortables should be those polaroids. Thanks in advance, another one I've been banging my head on the table with.

    Read the article

  • jQuery HOW TO?? pass additional parameters to success callback for $.ajax call ?

    - by dotnetgeek
    Hello jQuery Ninjas! I am trying, in vain it seems, to be able to pass additional parameters back to the success callback method that I have created for a successful ajax call. A little background. I have a page with a number of dynamically created textbox / selectbox pairs. Each pair having a dynamically assigned unique name such as name="unique-pair-1_txt-url" and name="unique-pair-1_selectBox" then the second pair has the same but the prefix is different. In an effort to reuse code, I have crafted the callback to take the data and a reference to the selectbox. However when the callback is fired the reference to the selectbox comes back as 'undefined'. I read here that it should be doable. I have even tried taking advantage of the 'context' option but still nothing. Here is the script block that I am trying to use: <script type="text/javascript" language="javascript"> $j = jQuery.noConflict(); function getImages(urlValue, selectBox) { $j.ajax({ type: "GET", url: $j(urlValue).val(), dataType: "jsonp", context: selectBox, success:function(data){ loadImagesInSelect(data, $j(this)) } , error:function (xhr, ajaxOptions, thrownError) { alert(xhr.status); alert(thrownError); } }); } function loadImagesInSelect(data, selectBox) { //var select = $j('[name=single_input.<?cs var:op_unique_name ?>.selImageList]'); var select = selectBox; select.empty(); $j(data).each(function() { var theValue = $j(this)[0]["@value"]; var theId = $j(this)[0]["@name"]; select.append("<option value='" + theId + "'>" + theValue + "</option>"); }); select.children(":first").attr("selected", true); } From what I have read, I feel I am close but I just cant put my finger on the missing link. Please help in your typical ninja stealthy ways. TIA

    Read the article

  • Implementing History Support using jQuery for AJAX websites built on asp.net AJAX

    - by anil.kasalanati
    Problem Statement: Most modern day website use AJAX for page navigation and gone are the days of complete HTTP redirection so it is imperative that we support back and forward buttons on the browser so that end users navigation is not broken. In this article we discuss about solutions which are already available and problems with them. Microsoft History Support: Post .Net 3.5 sp1 Microsoft’s Script manager supports history for websites using Update panels. This is achieved by enabling the ENABLE HISTORY property for the script manager and then the event “Page_Browser_Navigate” needs to be handled. So whenever the browser buttons are clicked the event is fired and the application can write code to do the navigation. The following articles provide good tutorials on how to do that http://www.asp.net/aspnet-in-net-35-sp1/videos/introduction-to-aspnet-ajax-history http://www.codeproject.com/KB/aspnet/ajaxhistorymanagement.aspx And Microsoft api internally creates an IFrame and changes the bookmark of the url. Unfortunately this has a bug and it does not work in Ie6 and 7 which are the major browsers but it works in ie8 and Firefox. And Microsoft has apparently fixed this bug in .Net 4.0. Following is the blog http://weblogs.asp.net/joshclose/archive/2008/11/11/asp-net-ajax-addhistorypoint-bug.aspx For solutions which are still running on .net 3.5 sp1 there is no solution which Microsoft offers so there is  are two way to solve this o   Disable the back button. o   Develop custom solution.   Disable back button Even though this might look like a very simple thing to do there are issues around doing this  because there is no event which can be manipulated from the javascript. The browser does not provide an api to do this. So most of the technical solution on internet offer work arounds like doing a history.forward(1) so that even if the user clicks a back button the destination page redirects the user to the original page. This is not a good customer experience and does not work for asp.net website where there are different views in the same page. There are other ways around detecting the window unload events and writing code there. So there are 2 events onbeforeUnload and onUnload and we can write code to show a confirmation message to the user. If we write code in onUnLoad then we can only show a message but it is too late to stop the navigation. And if we write on onBeforeUnLoad we can stop the navigation if the user clicks cancel but this event would be triggered for all AJAX calls and hyperlinks where the href is anything other than #. We can do this but the website has to be checked properly to ensure there are no links where href is not # otherwise the user would see a popup message saying “you are leaving the website”. Believe me after doing a lot of research on the back button disable I found it easier to support it rather than disabling the button. So I am going to discuss a solution which work  using jQuery with some tweaking. Custom Solution JQuery already provides an api to manage the history of a AJAX website - http://plugins.jquery.com/project/history We need to integrate this with Microsoft Page request manager so that both of them work in tandem. The page state is maintained in the cookie so that it can be passed to the server and I used jQuery cookie plug in for that – http://plugins.jquery.com/node/1386/release Firstly when the page loads there is a need to hook up all the events on the page which needs to cause browser history and following is the code to that. jQuery(document).ready(function() {             // Initialize history plugin.             // The callback is called at once by present location.hash.             jQuery.history.init(pageload);               // set onlick event for buttons             jQuery("a[@rel='history']").click(function() {                 //                 var hash = this.page;                 hash = hash.replace(/^.*#/, '');                 isAsyncPostBack = true;                 // moves to a new page.                 // pageload is called at once.                 jQuery.history.load(hash);                 return true;             });         }); The above scripts basically gets all the DOM objects which have the attribute rel=”history” and add the event. In our test page we have the link button  which has the attribute rel set to history. <asp:LinkButton ID="Previous" rel="history" runat="server" onclick="PreviousOnClick">Previous</asp:LinkButton> <asp:LinkButton ID="AsyncPostBack" rel="history" runat="server" onclick="NextOnClick">Next</asp:LinkButton> <asp:LinkButton ID="HistoryLinkButton" runat="server" style="display:none" onclick="HistoryOnClick"></asp:LinkButton>   And you can see that there is an hidden HistoryLinkButton which used to send a sever side postback in case of browser back or previous buttons. And note that we need to use display:none and not visible= false because asp.net AJAX would disallow any post backs if visible=false. And in general the pageload event get executed on the client side when a back or forward is pressed and the function is shown below function pageload(hash) {                   if (hash) {                         if (!isAsyncPostBack) {                           jQuery.cookie("page", hash);                     __doPostBack("HistoryLinkButton", "");                 }                isAsyncPostBack = false;                             } else {                 // start page             jQuery("#load").empty();             }         }   As you can see in case there is an hash in the url we are basically do an asp.net AJAX post back using the following statement __doPostBack("HistoryLinkButton", ""); So whenever the user clicks back or forward the post back happens using the event statement we provide and Previous event code is invoked in the code behind.  We need to have the code to use the pageId present in the url to change the page content. And there is an important thing to note – because the hash is worked out using the pageId’s there is a need to recalculate the hash after every AJAX post back so following code is plugged in function ReWorkHash() {             jQuery("a[@rel='history']").unbind("click");             jQuery("a[@rel='history']").click(function() {                 //                 var hash = jQuery(this).attr("page");                 hash = hash.replace(/^.*#/, '');                 jQuery.cookie("page", hash);                 isAsyncPostBack = true;                                   // moves to a new page.                 // pageload is called at once.                 jQuery.history.load(hash);                 return true;             });        }   This code is executed from the code behind using ScriptManager RegisterClientScriptBlock as shown below –       ScriptManager.RegisterClientScriptBlock(this, typeof(_Default), "Recalculater", "ReWorkHash();", true);   A sample application is available to be downloaded at the following location – http://techconsulting.vpscustomer.com/Source/HistoryTest.zip And a working sample is available at – http://techconsulting.vpscustomer.com/Samples/Default.aspx

    Read the article

  • How to use this json string with jquery autocomplete?

    - by Pandiya Chendur
    I have two textboxes in my page, <asp:TextBox ID="TxtClientName" runat="server"></asp:TextBox> <asp:TextBox ID="TxtClientMob" runat="server"></asp:TextBox> and i have a json string, {"Table" : [{"ClientName" : "Pandiya","ClientMobNo" : "9566643707"}, {"ClientName" : "Bala","ClientMobNo" : "9994403569"}]} Is it possible to use this json string to autocomplete in two textboxes seperating keys ClientName and ClientMobNo in jquery..... Any suggestion....

    Read the article

  • Can I do full text searches with jquery Autocomplete ?

    - by Jordie
    Hi, I want to be able to search a list of full names. The autocomplete demos I have seen have all searched from the beginning. Thats no good as I want matches on surname too. I can live without full text search if it at least follows word boundaries. Sorta like the tag search here. Hows that done? Cheers

    Read the article

  • Does jQuery have a plugin to display a "message bar" like the Twitter "wrong password" bar at the to

    - by Jian Lin
    Twitter will pop down a message bar at the top of the screen say "Wrong password" and after 10 seconds, it will slide up and disappear. Chrome also shows "Do you want to save the password" message box using such a way. Does jQuery have a plug in to do that already? Does it also work in IE 6? Because usually, the display of relative to the viewport (using position: fixed) will not work on IE 6. thanks.

    Read the article

  • jQuery and PHP suggested answers

    - by Samir Ghobril
    Hey guys, there is a form where the user select some of his friends and I'm curious on how I can implement a list that searches simultaneously while the user is typing a friend's name and when he selects the name the name is written in the text box(jQuery). And if the user wants to select more than one friend, when I'm inserting the names in the database, how can I separate the names that are written in one input field?

    Read the article

  • embed a jquery script after jquery is loaded by widget

    - by matthew k
    http://stackoverflow.com/a/6065421 was helpful to see how to confirm jquery has been loaded. my widget will need a class that was written using jquery. may i have some assistance on embedding this other class built using jquery? thank you, below is the snippet from the above link with my code added in the final portion as noted in the code comments: (function(window, document, version, callback) { var j, d; var loaded = false; if (!(j = window.jQuery) || version > j.fn.jquery || callback(j, loaded)) { var script = document.createElement("script"); script.type = "text/javascript"; script.src = "/media/jquery.js"; script.onload = script.onreadystatechange = function() { if (!loaded && (!(d = this.readyState) || d == "loaded" || d == "complete")) { callback((j = window.jQuery).noConflict(1), loaded = true); j(script).remove(); } }; document.documentElement.childNodes[0].appendChild(script) } })(window, document, "1.3", function($, jquery_loaded) { //my code added below var script_tag = document.createElement('script'); script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src", "http://mysite.com/widget/slides.jquery.js"); (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); $('#slides').slides({}); //this line gives an error. }); right now, i am trying the following based on the response(s) provided to this question (line that throws error is noted with a comment): //this function is called after jquery being embedded has been confirmed. {mysite} placeholder is nonexistent in actual code. function main() { jQuery(document).ready(function($) { var css_link = $("<link>", { rel: "stylesheet", type: "text/css", href: "http://mysite/widget/widget.css" }); css_link.appendTo('head'); $('#crf_widget').after('<div id="crf_widget_container"></div>'); /******* Load HTML *******/ var jsonp_url = "http://mysite/widget.php?callback=?"; $.getJSON(jsonp_url, function(data) { $('#crf_widget_container').html(data); $('#category_sel').change(function(){ alert(this.value); }); $.getScript("http://mysite/widget/slides.jquery.js", function(data, textStatus, jqxhr) { alert(1); //fires ok $('#slides').slides({}); //errors }); }); }); }

    Read the article

  • 36 Hour Free Offer: jQuery Fundamentals Training

    - by ScottGu
    Pluralsight (a great .NET training company) is offering the opportunity to watch their jQuery Fundamentals course for free for the next 36 hours. The course is presented by the most excellent Dan Wahlin and contains 5 hours of great end to end content.  Pluralsight will be offering this jQuery Fundamentals course for free until Thursday evening (9pm PST). Pluralsight has about 100 other great training courses available similar to this one.  They recently launched a new subscription plan that allows you to watch all of their courses online starting from $29 a month.  They also offer a 10 day free trial option that you can use to try it out.  You can learn more about it here. Free jQuery 1.5 Visual Cheat Sheet While on the topic of jQuery, I wanted to link to one other useful resource to download if you are using jQuery – which is a free jQuery PDF “cheat sheet” for the jQuery 1.5 APIs. You can download it for free here. Hope this helps, Scott P.S. I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu

    Read the article

  • How to reference jQuery in SharePoint2010

    - by ybbest
    In normal asp.net development, in order to add jQuery to your solution you need to add the following script to your Master page. <script language=”javascript” type=”text/javascript” src=”Scripts/jquery-1.4.1.min.js”></script> There are not many differences in referencing jQuery in SharePoint2010; in fact you got quite a few ways to achieve this. The first thing you need to do is to deploy jQuery using SharePoint module template in Visual studio. Then you can choose one of the following ways of referencing jQuery. 1. Using a Delegate Control 2. in the master Page 3. Ad hoc (e.g. in a site page or web part) 4. Using a Custom Action (Can be used as Sandbox solution, you can find example here.) References: jquery How to bootstrap JQuery on every SharePoint page, even in the Sandbox Referencing Javascript Files with SharePoint 2010 Custom Actions using SciptSrc

    Read the article

  • Advantages of using pure JavaScript over JQuery

    - by Shivan Dragon
    What are the advantages of using Javascript-only versus using JQuery-only? I have limited experience with JavaScript and JQuery coding. I've added bits and snippets of each to HTML pages but I've mostly coded server-side stuff in other languages. I've noticed that while you can theoretically do the same things using either of the two approaches (and of course you can even mix 'em up in the same project) there seems to be a tendency to always start using JQuery from the very beginning no-matter what the project demands are. So I'm simply wondering, are there any punctual benefits to not use JQuery-only but instead to just use plain old JavaScript? I know this looks like a non-question because it can be said about it that "there's no definite answer" or "it can be debated for ever", but I'm actually hoping for punctual answers such as "You can do this in one approach and you cannot do it with the other". ==EDIT== As per scrwtp's comment, I'm not referring just to the DOM Handling part. My question is rather: JQuery is a library. For Javascript. What I find strange about this library as opposed to other libraries for other languages is that in JQyery's case it seems to be designed to be able to use it exclusively and not need to touch Javascript directly. This is as opposed to let's say Hibernate and SQL, where even though the library (or rather framework in this case, but I think the analogy still applies) takes the handle on A LOT of aspects, you still get to use SQL when using it, at least for some fringe cases. However in JQuery & Javascript case, you could do anything you do with Javascript using only JQuery (or at least that's how it seems to me).

    Read the article

  • How to associate jquery validation with only one button if there are many?

    - by Eyla
    Greetings, In my current project, I have gridview, search button, text box for search, text box, and submit button. -I should input string in the search box then click search button. -when click search button, it will retrieve all matches records then bind them to the view grid. -then when I click a record in the gridview, it should bound a field to the second text box. finally I should submit the page by clicking in submit button. where is the problem: -the problme that I'm using jquery validation plugin that will make second text box is required. -when I click search button will not allow postback until I write some thing in second text box. How can I make scond text box only do validation for required field only when click asp.net submit button. here is my code: <%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="IMAM_APPLICATION.WebForm1" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <script src="js/jquery-1.4.1-vsdoc.js" type="text/javascript"></script> <script src="js/jquery.validate.js" type="text/javascript"></script> <script src="js/js.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("#aspnetForm").validate({ // debug: true, rules: { "<%=txtFirstName.UniqueID %>": { required: true } }, errorElement: "mydiv", wrapper: "mydiv", // a wrapper around the error message errorPlacement: function(error, element) { offset = element.offset(); error.insertBefore(element) error.addClass('message'); // add a class to the wrapper error.css('position', 'absolute'); error.css('left', offset.left + element.outerWidth()); error.css('top', offset.top - (element.height() / 2)); } }); }) </script> <div id="mydiv"> <asp:GridView ID="GridView1" runat="server" style="position:absolute; top: 280px; left: 30px; height: 240px; width: 915px;" PageSize="5" onselectedindexchanged="GridView1_SelectedIndexChanged" AutoGenerateColumns="False" DataKeyNames="idcontact_info"> <Columns> <asp:CommandField ShowSelectButton="True" InsertVisible="False" ShowCancelButton="False" /> <asp:BoundField DataField="First_Name" HeaderText="First Name" /> <asp:BoundField AccessibleHeaderText="Midle Name" DataField="Midle_Name" /> <asp:BoundField DataField="Last_Name" HeaderText="Last Name" /> <asp:BoundField DataField="Phone_home" HeaderText="Phone Home" /> <asp:BoundField DataField="cell_home" HeaderText="Mobile Home" /> <asp:BoundField DataField="phone_work" HeaderText="Phone Work" /> <asp:BoundField DataField="cell_Work" HeaderText="Mobile Work" /> <asp:BoundField DataField="Email_Home" HeaderText="Personal Home" /> <asp:BoundField DataField="Email_work" HeaderText="Work Email" /> </Columns> </asp:GridView> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="IMAM_APPLICATION.DSContactTableAdapters.contact_infoTableAdapter" UpdateMethod="Update"> <DeleteParameters> <asp:Parameter Name="Original_idcontact_info" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="Title" Type="String" /> <asp:Parameter Name="First_Name" Type="String" /> <asp:Parameter Name="Midle_Name" Type="String" /> <asp:Parameter Name="Last_Name" Type="String" /> <asp:Parameter Name="Address1_Home" Type="String" /> <asp:Parameter Name="Address2_Home" Type="String" /> <asp:Parameter Name="City_Home" Type="String" /> <asp:Parameter Name="State_Home" Type="String" /> <asp:Parameter Name="Prov_Home" Type="String" /> <asp:Parameter Name="ZipCode_Home" Type="String" /> <asp:Parameter Name="Country_Home" Type="String" /> <asp:Parameter Name="Phone_home" Type="String" /> <asp:Parameter Name="Phone_Home_Ext" Type="String" /> <asp:Parameter Name="Cell_home" Type="String" /> <asp:Parameter Name="Fax_home" Type="String" /> <asp:Parameter Name="Email_Home" Type="String" /> <asp:Parameter Name="material_status" Type="String" /> <asp:Parameter Name="DateOfBrith" Type="String" /> <asp:Parameter Name="company" Type="String" /> <asp:Parameter Name="Work_Field" Type="String" /> <asp:Parameter Name="Occupation" Type="String" /> <asp:Parameter Name="sub_Occupation" Type="String" /> <asp:Parameter Name="Other" Type="String" /> <asp:Parameter Name="Address1_work" Type="String" /> <asp:Parameter Name="Address2_work" Type="String" /> <asp:Parameter Name="City_Work" Type="String" /> <asp:Parameter Name="State_Work" Type="String" /> <asp:Parameter Name="Prov_Work" Type="String" /> <asp:Parameter Name="ZipCode_Work" Type="String" /> <asp:Parameter Name="Country_Work" Type="String" /> <asp:Parameter Name="Phone_Work" Type="String" /> <asp:Parameter Name="Phone_Work_Ext" Type="String" /> <asp:Parameter Name="Cell_Work" Type="String" /> <asp:Parameter Name="Fax_Work" Type="String" /> <asp:Parameter Name="Email_work" Type="String" /> <asp:Parameter Name="WebSite" Type="String" /> <asp:Parameter Name="Note" Type="String" /> <asp:Parameter Name="Groups" Type="String" /> <asp:Parameter Name="InterPhoneHome" Type="Int32" /> <asp:Parameter Name="InterMobileHome" Type="Int32" /> <asp:Parameter Name="InterFaxHome" Type="Int32" /> <asp:Parameter Name="InterPhoneWork" Type="Int32" /> <asp:Parameter Name="InterMobileWork" Type="Int32" /> <asp:Parameter Name="InterFaxWork" Type="Int32" /> <asp:Parameter Name="rdoPhoneHome" Type="Int32" /> <asp:Parameter Name="rdoMobileHome" Type="Int32" /> <asp:Parameter Name="rdoEmailHome" Type="Int32" /> <asp:Parameter Name="rdoPhoneWork" Type="Int32" /> <asp:Parameter Name="rdoMobileWork" Type="Int32" /> <asp:Parameter Name="rdoEmailWork" Type="Int32" /> <asp:Parameter Name="locationHome" Type="Int32" /> <asp:Parameter Name="locationWork" Type="Int32" /> <asp:Parameter Name="Original_idcontact_info" Type="Int32" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="Title" Type="String" /> <asp:Parameter Name="First_Name" Type="String" /> <asp:Parameter Name="Midle_Name" Type="String" /> <asp:Parameter Name="Last_Name" Type="String" /> <asp:Parameter Name="Address1_Home" Type="String" /> <asp:Parameter Name="Address2_Home" Type="String" /> <asp:Parameter Name="City_Home" Type="String" /> <asp:Parameter Name="State_Home" Type="String" /> <asp:Parameter Name="Prov_Home" Type="String" /> <asp:Parameter Name="ZipCode_Home" Type="String" /> <asp:Parameter Name="Country_Home" Type="String" /> <asp:Parameter Name="Phone_home" Type="String" /> <asp:Parameter Name="Phone_Home_Ext" Type="String" /> <asp:Parameter Name="Cell_home" Type="String" /> <asp:Parameter Name="Fax_home" Type="String" /> <asp:Parameter Name="Email_Home" Type="String" /> <asp:Parameter Name="material_status" Type="String" /> <asp:Parameter Name="DateOfBrith" Type="String" /> <asp:Parameter Name="company" Type="String" /> <asp:Parameter Name="Work_Field" Type="String" /> <asp:Parameter Name="Occupation" Type="String" /> <asp:Parameter Name="sub_Occupation" Type="String" /> <asp:Parameter Name="Other" Type="String" /> <asp:Parameter Name="Address1_work" Type="String" /> <asp:Parameter Name="Address2_work" Type="String" /> <asp:Parameter Name="City_Work" Type="String" /> <asp:Parameter Name="State_Work" Type="String" /> <asp:Parameter Name="Prov_Work" Type="String" /> <asp:Parameter Name="ZipCode_Work" Type="String" /> <asp:Parameter Name="Country_Work" Type="String" /> <asp:Parameter Name="Phone_Work" Type="String" /> <asp:Parameter Name="Phone_Work_Ext" Type="String" /> <asp:Parameter Name="Cell_Work" Type="String" /> <asp:Parameter Name="Fax_Work" Type="String" /> <asp:Parameter Name="Email_work" Type="String" /> <asp:Parameter Name="WebSite" Type="String" /> <asp:Parameter Name="Note" Type="String" /> <asp:Parameter Name="Groups" Type="String" /> <asp:Parameter Name="InterPhoneHome" Type="Int32" /> <asp:Parameter Name="InterMobileHome" Type="Int32" /> <asp:Parameter Name="InterFaxHome" Type="Int32" /> <asp:Parameter Name="InterPhoneWork" Type="Int32" /> <asp:Parameter Name="InterMobileWork" Type="Int32" /> <asp:Parameter Name="InterFaxWork" Type="Int32" /> <asp:Parameter Name="rdoPhoneHome" Type="Int32" /> <asp:Parameter Name="rdoMobileHome" Type="Int32" /> <asp:Parameter Name="rdoEmailHome" Type="Int32" /> <asp:Parameter Name="rdoPhoneWork" Type="Int32" /> <asp:Parameter Name="rdoMobileWork" Type="Int32" /> <asp:Parameter Name="rdoEmailWork" Type="Int32" /> <asp:Parameter Name="locationHome" Type="Int32" /> <asp:Parameter Name="locationWork" Type="Int32" /> </InsertParameters> </asp:ObjectDataSource> <asp:TextBox ID="txtSearch" runat="server" style="position:absolute; top: 560px; left: 170px;" ></asp:TextBox> <asp:Button ID="btnSearch" runat="server" Text="Search" style="position:absolute; top: 555px; left: 375px;" CausesValidation="False" onclick="btnSearch_Click"/> <asp:Label ID="Label7" runat="server" Style="position: absolute; top: 630px; left: 85px;" Text="First Name"></asp:Label> <asp:TextBox ID="txtFirstName" runat="server" Style="top: 630px; left: 185px; position: absolute; height: 22px; width: 128px"></asp:TextBox> <asp:Button ID="submit" runat="server" Text="submit" /> </div> </asp:Content>

    Read the article

  • Using depends with the jQuery Validation plugin

    - by Glenn Slaven
    I've got a form with a bunch of textboxes that are disabled by default, then enabled by use of a checkbox next to each one. When enabled, the values in these textboxes are required to be a valid number, but when disabled they don't need a value (obviously). I'm using the jQuery Validation plugin to do this validation, but it doesn't seem to be doing what I expect. When I click the checkbox and disable the textbox, I still get the invalid field error despite the depends clause I've added to the rules (see code below). Oddly, what actually happens is that the error message shows for a split second then goes away. Here is a sample of the list of checkboxes & textboxes: <ul id="ItemList"> <li> <label for="OneSelected">One</label><input id="OneSelected" name="OneSelected" type="checkbox" value="true" /> <input name="OneSelected" type="hidden" value="false" /> <input disabled="disabled" id="OneValue" name="OneValue" type="text" /> </li> <li> <label for="TwoSelected">Two</label><input id="TwoSelected" name="TwoSelected" type="checkbox" value="true" /> <input name="TwoSelected" type="hidden" value="false" /> <input disabled="disabled" id="TwoValue" name="TwoValue" type="text" /> </li> </ul> And here is the jQuery code I'm using //Wire up the click event on the checkbox jQuery('#ItemList :checkbox').click(function(event) { var textBox = jQuery(this).siblings(':text'); textBox.valid(); if (!jQuery(this).attr("checked")) { textBox.attr('disabled', 'disabled'); textBox.val(''); } else { textBox.removeAttr('disabled'); textBox[0].focus(); } }); //Add the rules to each textbox jQuery('#ItemList :text').each(function(e) { jQuery(this).rules('add', { required: { depends: function(element) { return jQuery(element).siblings(':checkbox').attr('checked'); } }, number: { depends: function(element) { return jQuery(element).siblings(':checkbox').attr('checked'); } } }); }); Ignore the hidden field in each li it's there because I'm using asp.net MVC's Html.Checkbox method.

    Read the article

  • JQueryTools live?

    - by deryck
    I´m using JQuery Tools http://flowplayer.org/tools/ in one big project. The issues is: When I load a page using ajax all this JQuery Tools stuff stop working. I know I have to re-bind the events or use jQuery.Live but I don´t know how to do this with JQuery Tools. I need methods like $(".element").overlay(...) $(".element").tabs(...) workin live after using jQuery.load() (Ajax) Anybody know how to do this please? Thanks.

    Read the article

  • C code autocomplete in Eclipse

    - by Ittai
    Hi, I'm a Java developer and I've downloaded the Eclipse for C (course purposes) and to my amazement the control+space shortcut (for autocomplete) did not work. I've created a new project and a new class using the wizzards and started to type "print" and then tried to find an autocomplete feature. After a bit of googling I arrived at C/C++-Editor-Content Assist-Advanced and there I verified that Help proposals,Parsing-based proposals and Template proposals options were checked. I then went over to the Keys preferences page using the link at that page and entered a binding for all relevant content assist from before C\C++ Content Assist (type...) and chose in the When box the C\C++ Editor option. But alas no autocompletion was offered. Can someone please point me to the right direction? Thanks, Ittai

    Read the article

  • How to get the Focus on one of Buttons of JQuery Dialog on ASP.NET MVC page?

    - by Rita
    Hi I have an ASP.NET MVC page(Registration). On loading the page, i am calling Jquery Dialog with Agree and Disagree buttons on that Dialog. 1). How to set the focus to Agree button by default? 2). How to disable the X (Close) Mark that is on Top right corner? (So that i don't want the user to close that dialog simply). Code: $("#dialog-confirm").dialog({ closeOnEscape: false, autoOpen: <%= ViewData["autoOpen"] %>, height: 400, width: 550, modal: true, buttons: { 'Disagree': function() { location.href = "/"; }, 'Agree': function() { $(this).dialog('close'); $(this).focus(); } }, beforeclose: function(event, ui) { var i = event.target.id; var j = 0; } }); Appreciate your responses. Thanks

    Read the article

  • Using jQuery UI with Rails

    - by Steve
    Hi, I am using jQuery in my Rails App. But when I try to turn my button to jQueryUI(Cupertino theme) button, it does not appear to be look like a jQuery UI Themed button. jQuery works because I am using it for Ajax and it works properly. I have pasted the code. Please tell me whether I am doing it wrongly <%=javascript_include_tag "jquery-1.4.2.min","jquery-ui-1.8.1.min","jquery.nivo.slider.pack","application"%> <input type = submit id = "add" name = "add" value = " Add " /> $("#add").button(); Thanks

    Read the article

  • How can I determine if jquery tab is shown because of user click or from tab rotation

    - by Richard Edwards
    I've been using the jQuery UI tabs for a bit now and an interesting request has come up. The current tab setup is using the rotation feature. I need to find a way to determine if the tab is shown because of the result of the rotation itself, or because a user physically clicked the tab. I've wired up all of the standard events, show and select and they fire regardless of the source of the tab change. Does anyone have any ideas? Basically I'd like to do something additional if the user clicked the tab, but not if the tab changes by itself via the rotation. If I wire up the click even to the tabs themselves it doesn't seem to get fired at all, I'm assuming because the tabs widget is using that event itself.

    Read the article

  • Code editor with autocomplete

    - by Andrey
    I need to create a code editor for my own simple language: className.MethodName(parameterName = 2, ... ) I've created the appropriate grammar and autogenerate parser using ANTLR tool. Now I would like to have an autocomplete for class, method, variables and parameter names. This list should be context dependent, f.e. for "class." it should display methods and for "class.Method(" - parameters. I was going to parse the text and display the list depending on in which node the cursor is. The problem is that for incomplete code like "aaa.bbb(" the parser produces an error instead of a syntax tree. Any idea how to solve this problem? Maybe I'm on the wrong way and I shouldn't parse code to display autocomplete?

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >