Search Results

Search found 33064 results on 1323 pages for 'jquery date range picker'.

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

  • 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

  • SSIS - Range lookups

    - by Repieter
      When developing an ETL solution in SSIS we sometimes need to do range lookups in SSIS. Several solutions for this can be found on the internet, but now we have built another solution which I would like to share, since it's pretty easy to implement and the performance is fast.   You can download the sample package to see how it works. Make sure you have the AdventureWorks2008R2 and AdventureWorksDW2008R2 databases installed. (Apologies for the layout of this blog, I don't do this too often :))   To give a little bit more information about the example, this is basically what is does: we load a facttable and do an SCD type 2 lookup operation of the Product dimension. This is done with a script component.   First we query the Data warehouse to create the lookup dataset. The query that is used for that is:   SELECT     [ProductKey]     ,[ProductAlternateKey]     ,[StartDate]     ,ISNULL([EndDate], '9999-01-01') AS EndDate FROM [DimProduct]     The output of this query is stored in a DataTable:     string lookupQuery = @"                         SELECT                             [ProductKey]                             ,[ProductAlternateKey]                             ,[StartDate]                             ,ISNULL([EndDate], '9999-01-01') AS EndDate                         FROM [DimProduct]";           OleDbCommand oleDbCommand = new OleDbCommand(lookupQuery, _oleDbConnection);         OleDbDataAdapter adapter = new OleDbDataAdapter(oleDbCommand);           _dataTable = new DataTable();         adapter.Fill(_dataTable);     Now that the dimension data is stored in the DataTable we use the following method to do the actual lookup:   public int RangeLookup(string businessKey, DateTime lookupDate)     {         // set default return value (Unknown)         int result = -1;           DataRow[] filteredRows;         filteredRows = _dataTable.Select(string.Format("ProductAlternateKey = '{0}'", businessKey));           for (int i = 0; i < filteredRows.Length; i++)         {             // check if the lookupdate is found between the startdate and enddate of any of the records             if (lookupDate >= (DateTime)filteredRows[i][2] && lookupDate < (DateTime)filteredRows[i][3])             {                 result = (filteredRows[i][0] == null) ? -1 : (int)filteredRows[i][0];                 break;             }         }           filteredRows = null;           return result;     }       This method is executed for every row that passes the script component. This is implemented in the ProcessInputRow method   public override void Input0_ProcessInputRow(Input0Buffer Row)     {         // Perform the lookup operation on the current row and put the value in the Surrogate Key Attribute         Row.ProductKey = RangeLookup(Row.ProductNumber, Row.OrderDate);     }   Now what actually happens?!   1. Every record passes the business key and the orderdate to the RangeLookup method. 2. The DataTable is then filtered on the business key of the current record. The output is stored in a DataRow [] object. 3. We loop over the DataRow[] object to see where the orderdate meets the following expression: (lookupDate >= (DateTime)filteredRows[i][2] && lookupDate < (DateTime)filteredRows[i][3]) 4. When the expression returns true (so where the data is between the Startdate and the EndDate), the surrogate key of the dimension record is returned   We have done some testing with this solution and it works great for us. Hope others can use this example to do their range lookups.

    Read the article

  • Javascript array of dates - not iterating properly (jquery ui datepicker)

    - by PaulB
    Hi I have some code which builds an array of date ranges. I then call a function, passing it a date, and compare that date with dates in the array. I'm doing it this way because the dates are stored in a cms, and I'm manipulating the JqueryUI datepicker. Unfortunately my code only checks the first date range in the array - and I can't figure out why! I think it's probably something simple (/stupid!) - if anyone can shed some light on it I'd be extremely grateful! The code is below - the june-september range works fine, the december to jan is totally ignored... <script type="text/javascript" language="javascript"> var ps1 = new Date(2010, 06-1, 18); var pe1 = new Date(2010, 09-1, 03); var ps2 = new Date(2010, 12-1, 20); var pe2 = new Date(2011, 01-1, 02); var peakStart = new Array(ps1,ps2); var peakEnd = new Array(pe1,pe2); function checkDay(date) { var day = date.getDay(); for (var i=0; i<peakStart.length; i++) { if ((date > peakStart[i]) && (date < peakEnd[i])) { return [(day == 5), '']; } else { return [(day == 1 || day == 5), '']; } } } </script>

    Read the article

  • Jquery ui sortable clone helper not working

    - by Jeremy Seekamp
    Maybe I don't understand how clone works with sortable, but here is what I would like to do. When sorting an item I would like a clone of the item I am dragging remain until I stop drop the item in its new position. Here's the code: <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script> <style type="text/css"> .sort { width: 150px; } .ui-state-highlight { background-color: #000; height:2px; } </style> </head> <body> <div> <ul class="sort"> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> </ul> </div> <script type="text/javascript"> $(function() { $('.sort').sortable({ helper: 'clone', placeholder: 'ui-state-highlight', opacity: '.5' }) }) </script> </body> </html> Thanks in advance for the help!

    Read the article

  • JQuery UI Autocomplete showing as bullets

    - by awshepard
    The JQuery UI Demo page for autocomplete (link) has a nice looking search box and drop down with nice colors and highlights and such. When I implement it for myself, I end up with a bulleted list. How do I get my drop down of suggestions to look like theirs? A few notes/code fragments: I'm working in .NET land, so I'm using the <asp:ScriptManager> tag with <asp:ScriptReference>s inside it to get the hosted jquery.min.js (1.4.2) and jquery-ui.min.js (1.8.1) files from Google. My input box is fairly simple: <div class='ui-widget'> <label for="terms">Term: </label> <input id="terms" class="ui-autocomplete-input"> </div> My autocomplete looks like: $(""#terms"").autocomplete({source:""GetAttributesJSON.aspx"",minLength:2}); I get the correct data back, so that's not the issue. I just want fancy graphics. Any thoughts would be much appreciated.

    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

  • Automatically resize jQuery UI dialog to the width of the content loaded by ajax

    - by womp
    I'm having a lot of trouble finding specific information and examples on this. I've got a number of jQuery UI dialogs in my application attached to divs that are loaded with .ajax() calls. They all use the same setup call: $(".mydialog").dialog({ autoOpen: false, resizable: false, modal: true }); I just want to have the dialog resize to the width of the content that gets loaded. Right now, the width just stays at 300px (the default) and I get a horizontal scrollbar. As far as I can tell, "autoResize" is no longer an option for dialogs, and nothing happens when I specify it. I'm trying to not write a separate function for each dialog, so .dialog("option", "width", "500") is not really an option, as each dialog is going to have a different width. Specifying width: 'auto' for the dialog options just makes the dialogs take up 100% of the width of the browser window. What are my options? I'm using jQuery 1.4.1 with jQuery UI 1.8rc1. It seems like this should be something that is really easy. EDIT: I've implemented a kludgy workaround for this, but I'm still looking for a better solution.

    Read the article

  • jQuery capture all changes to named inpt on a form

    - by Brian M. Hunt
    I'm trying to determine when any of a set of named input/select/radio/checked/hidden fields in a form change. In particular, I'd like to capture when any changes are made to fields matching jQuery's selector $("form :input"), and where that input is has a name attribute. However, the form isn't static i.e. some of the fields are dynamically added later. My initial thought is to keep track of when new named elements matching :input are added, and then add an event handler, like this: function on_change() { alert("The form element with name " + $(this).attr("name") + " has changed"); } function reg_new_e_handler(input_element) { input_element.change(on_change); } However, I'm quite hopeful I can avoid this with some jQuery magic. In particular, is there a way to register an event handler in jQuery that would handle input elements that match the following: $("form :input").filter( function () { $(this).attr("name") } ).change(on_change); However, have this event set update whenever new input elements are added. I've thought that it may be possible to capture keyup event on the form node with $("form").keyup(on_change), but I'm not so sure how one could capture change events. I'd also like this to capture keyup events. Thank you for reading. Brian

    Read the article

  • Jquery Template textbox not showing datepicker

    - by pirzada
    I am using Datepicker on one of the the textbox in Jquery template but its not popping up. Outside of the template working fine. Below is what I want to do. jQuery().ready(function () { //$("#HireDate").datepicker(); $("#HireDate").datepicker({dateFormat:'dd-mm-yy', showAnim:'fadeIn'}) }); <script id="UserDetailTemplate" type="text/x-jquery-tmpl"> <table style="width:100%;"> <tbody> <tr> <td style="width:25%;font-weight:bold;">HireDate:</td> <td><input type="text" id="HireDate" value="${ HireDate }" /></td> </tr> </table> </td> </tr> </tbody> </table> </script>

    Read the article

  • JQuery UI Tabs - replace tab and contents

    - by Tauren
    What is the best way to replace the currently selected tab and its contents? The content is dynamically generated with jquery, not loaded via a URL. I need to do this from outside of any tab code or tab event handler (show, add, etc.). There is a link elsewhere on the page that should do the following when clicked: Change the tab's title Change the tab's className Clear out all elements of the tabcontent div Change the tabcontent div's className Generate new content inside the tabcontent div Note that the only reference this link's click() handler has is to the JQuery tabs object ($Tabs). I can get the selected tab with $Tabs.tabs('option','selected'). But how can I get a reference to the selected tab's tab and panel? Inside of a jquery tab handler (show, add, etc.), I have access to ui.tab and ui.panel, but is there a way to get them from a tabs option? Would it be better to simply remove the currently selected tab and then add a new tab in the same index location? I'd have to put the code to generate the tab content into the add() handler then I suppose.

    Read the article

  • Finding date between start date and end date

    - by Pankaj Khurana
    Hi, I want to check whether a date is between start date and end date. i have added a where class where datepaid between '2010-04-01' AND '2010-04-15' but the problem is that it excludes '2010-04-15'. It should include end date also how can i do this? Please help me on this Regards, pankaj

    Read the article

  • Macro keeps crashing need to speed it up or rewrite it, excel vba 50,000 lines of data

    - by Joel
    Trying to speed up a macro that runs over 50,000 lines ! I have two ways of performing the same vba macro Sub deleteCommonValue() Dim aRow, bRow As Long Dim colB_MoreFirst, colB_LessFirst, colB_Second, colC_MoreFirst, colC_LessFirst, colC_Second As Integer Dim colD_First, colD_Second As Integer Application.ScreenUpdating = False Application.DisplayStatusBar = False Application.Calculation = xlCalculationManual Application.EnableEvents = False aRow = 2 bRow = 3 colB_MoreFirst = Range("B" & aRow).Value + 0.05 colB_LessFirst = Range("B" & aRow).Value - 0.05 colB_Second = Range("B" & bRow).Value colC_MoreFirst = Range("C" & aRow).Value + 0.05 colC_LessFirst = Range("C" & aRow).Value - 0.05 colC_Second = Range("C" & bRow).Value colD_First = Range("D" & aRow).Value colD_Second = Range("D" & bRow).Value Do If colB_Second <= colB_MoreFirst And colB_Second >= colB_LessFirst Then If colC_Second <= colC_MoreFirst And colC_Second >= colC_LessFirst Then If colD_Second = colD_First Or colD_Second > colD_First Then Range(bRow & ":" & bRow).Delete 'bRow delete, assign new value to bRow colB_Second = Range("B" & bRow).Value colC_Second = Range("C" & bRow).Value colD_Second = Range("D" & bRow).Value '----------------------------------------------------- Else Range(aRow & ":" & aRow).Delete bRow = aRow + 1 'aRow value deleted, assign new value to aRow and bRow colB_MoreFirst = Range("B" & aRow).Value + 0.05 colB_LessFirst = Range("B" & aRow).Value - 0.05 colB_Second = Range("B" & bRow).Value colC_MoreFirst = Range("C" & aRow).Value + 0.05 colC_LessFirst = Range("C" & aRow).Value - 0.05 colC_Second = Range("C" & bRow).Value colD_First = Range("D" & aRow).Value colD_Second = Range("D" & bRow).Value '----------------------------------------------------- End If Else bRow = bRow + 1 'Assign new value to bRow colB_Second = Range("B" & bRow).Value colC_Second = Range("C" & bRow).Value colD_Second = Range("D" & bRow).Value '----------------------------------------------------- End If Else bRow = bRow + 1 'Assign new value to bRow colB_Second = Range("B" & bRow).Value colC_Second = Range("C" & bRow).Value colD_Second = Range("D" & bRow).Value '----------------------------------------------------- End If If IsEmpty(Range("D" & bRow).Value) = True Then aRow = aRow + 1 bRow = aRow + 1 'finish compare aRow, assign new value to aRow and bRow colB_MoreFirst = Range("B" & aRow).Value + 0.05 colB_LessFirst = Range("B" & aRow).Value - 0.05 colB_Second = Range("B" & bRow).Value colC_MoreFirst = Range("C" & aRow).Value + 0.05 colC_LessFirst = Range("C" & aRow).Value - 0.05 colC_Second = Range("C" & bRow).Value colD_First = Range("D" & aRow).Value colD_Second = Range("D" & bRow).Value '----------------------------------------------------- End If Loop Until IsEmpty(Range("D" & aRow).Value) = True Application.ScreenUpdating = False Application.DisplayStatusBar = False Application.Calculation = xlCalculationAutomatic Application.EnableEvents = False End Sub or Sub deleteCommonValue() Dim aRow, bRow As Long Application.ScreenUpdating = False aRow = 2 bRow = 3 Do If Range("B" & bRow).Value <= (Range("B" & aRow).Value + 0.05) _ And Range("B" & bRow).Value >= (Range("B" & aRow).Value - 0.05) Then If Range("C" & bRow).Value <= (Range("C" & aRow).Value + 0.05) _ And Range("C" & bRow).Value >= (Range("C" & aRow).Value - 0.05) Then If Range("D" & bRow).Value = (Range("D" & aRow).Value) _ Or Range("D" & bRow).Value > (Range("D" & aRow).Value) Then Range(bRow & ":" & bRow).Delete Else Range(aRow & ":" & aRow).Delete bRow = aRow + 1 Range("A" & aRow).Select End If Else bRow = bRow + 1 Range("A" & bRow).Select End If Else bRow = bRow + 1 Range("A" & bRow).Select End If If IsEmpty(Range("D" & bRow).Value) = True Then aRow = aRow + 1 bRow = aRow + 1 End If Loop Until IsEmpty(Range("D" & aRow).Value) = True End Sub I dont know if my best option will be to split the rows into multiple sheets?

    Read the article

  • Solr date field tdate vs date?

    - by user550178
    So I have a question about Solr's field date types which is pretty straight forward: what's the difference between a 'date' field and a 'tdate' one? The schema .xml claims that 'For faster range queries, consider the tdate type' and 'A Trie based date field for faster date range queries and date faceting. ' Fair enough... but what's the precisionStep="6" all about? should i change this? does it change the way i would create the query in case I use the tdate? What's the real advantage or what does Solr do that makes it better? P.S went through google, Solr manual, solr wiki and the java docs without any luck so I'd appreciate a kind and explanatory answer :)... Also checked: http://www.lucidimagination.com/blog/2009/05/13/exploring-lucene-and-solrs-trierange-capabilities/ http://web.archiveorange.com/archive/v/AAfXfqRYyLnDFtskmLRi

    Read the article

  • I need to add a range for a date input field in jquery

    - by user338413
    I've got an input field in a form that needs a date value. I'm using jQuery UI's datepicker for the calendar and I've set a range for it. However, the user can override that by typing a different date in the input field. How can I specify a date range for the field with jQuery validation? All I see with jQuery is that you can only specify that the field be a date type. Can I create min and max values that work with dates?

    Read the article

  • When to update jQuery?

    - by epaulk
    When you recommend updating jQuery/jQuery UI? Or in other words: what are the best practices for updating jQuery/jQuery UI? I’m working on a long project that will take at least one more year. In that time span, I’m sure that jQuery/jQuery UI will be updated many times. Do you recommend update my jQuery/jQuery UI files every time an update is released? Or is better to stick with a particular version until the end of the project? I’m afraid of “breaking” code changes, and every time an update is released, I have to test everything. That takes too much time. But on the other hand, if I didn’t update, I’m afraid of bugs that later will bite me in the rear. The project is an ASP.MVC and I use jQuery a lot. Any thoughts?

    Read the article

  • JQuery Validation Plugin: Use Custom Ajax Method

    - by namtax
    Hi Looking for some assistance with the Jquery form validation plugin if possible. I am validating the email field of my form on blur by making an ajax call to my database, which checks if the text in the email field is currently in the database. // Check email validity on Blur $('#sEmail').blur(function(){ // Grab Email From Form var itemValue = $('#sEmail').val(); // Serialise data for ajax processing var emailData = { sEmail: itemValue } // Do Ajax Call $.getJSON('http://localhost:8501/ems/trunk/www/cfcs/admin_user_service.cfc?method=getAdminUserEmail&returnFormat=json&queryformat=column', emailData, function(data){ if (data != false) { var errorMessage = 'This email address has already been registered'; } else { var errorMessage = 'Good' } }) }); What I would like to do, is encorporate this call into the rules of my JQuery Validation Plugin...e.g $("#setAdminUser").validate({ rules:{ sEmail: { required: function(){ // Replicate my on blur ajax email call here } }, messages:{ sEmail: { required: "this email already exists" } }); Wondering if there is anyway of achieving this? Many thanks

    Read the article

  • jQuery Cycle pageAnchorBuilder / jQuery Selectors

    - by Wes
    I'm trying to grab the source of an image with jquery. My HTML looks like this: <div class="featuredSlideImage"> <img src="http://apture.s3.amazonaws.com/0000012865c9e9d984b36217007f000000000001.latte%20heart.jpg"/> </div> <!--featuredSlideImage--> My jQuery Selector is: return '<li>' + jQuery(slide).children(".featuredSlideImage").html(); + '</li>'; which reutrns this: <img src="http://apture.s3.amazonaws.com/0000012865c9e9d984b36217007f000000000001.latte%20heart.jpg"/> I was to just return the source of that, sans the HTML. How can I go about this?

    Read the article

  • jquery ui tabs major style change

    - by Jonah
    I am using jquery UI tabs and I need to majorly change the styling on it. I need to rempve the background image, the borders, almost everything. I need it to look minimal, and not like it's self contained. What's the best way to do this? I need to use the default UI styling for the calendar widget however, which is on the same page. I've done a lot of research and everyone seems to point to the theme-roller. However, i do not just want to change the colors and border radii. I need to delete crap. theme-roller seems to be just change things like colors (not really useful for the real world) Is it even worth using jquery UI for my tabs?

    Read the article

  • Include OpenX ad in a jquery-ui dialog?

    - by planetclaire
    I'm loading some content into a jquery-ui dialog via .ajax. That's all working fine but now I've been given an OpenX ad to embed into the dialog & can't figure out how to do it. I know all the script is stripped when coming in via ajax, & I know how to use $.getScript to load .js files for use in the dialog, but the OpenX ad script I've got uses document.write so I think it's expecting to be embedded inline into the desired position on the page. I've tried appending the escaped script string into the div on ajax success of the main content as below, but this results in the page being redirected to a page with just the ad on it. Attempt shown below: $("#" + idHelpPage).find(".adScript").append("<script type='text/javascript'>var m3_u = (location.protocol=='https:'?'https://d1.openx.org/ajs.php':'http://d1.openx.org/ajs.php');var m3_r = ... etc etc I'm ok with jquery but not great with javascript, would really appreciate any help! Also if you want to see any other code.

    Read the article

  • adding jquery validation after form created

    - by CoffeeCode
    im using a jquery validation plugin first i add the validation to the form: $('#EmployeeForm').validate({ rules: { "Employee.FirstName": "required", "Employee.PatronymicName": "required", "Employee.LastName": "required", "Employee.BirthDay": { required: true, date: true } }, messages: { "Employee.FirstName": { required: "*" }, "Employee.PatronymicName": { required: "*" }, "Employee.LastName": { required: "*" }, "Employee.BirthDay": { required: "*", date: "00.00.00 format" } } }); and then latter a need to add validation rules to other form elements: $('#Address_A.Phone1, #Address_A.Phone2, #Address_B.Phone1, #Address_B.Phone2').rules("add", { digits: true, messages: { digits: "?????? ?????" } }); but i get an error: 'form' is null or not an object i check, the form and all the elements in it are created before i add validation to it. cant figer out whats wrong.

    Read the article

  • Remove filter attribute after jQuery UI dialog is finished opening

    - by womp
    Using jQuery UI 1.8rc3 combined with the new jquery.effects.fade.js code, I've been able to finally apply fade-in and fade-out effects to opening the UI Dialog widgets. Hooray! $dialog.dialog({ show: { effect: "fade", options: {}, speed: 150 } } This works great - unfortunately, there's the known IE7 & 8 bug where the ClearType gets turned off by the application of an empty filter: style attribute after the fade effect is finished. I have the code to remove the filter attribute, I just can't find a good way to hook it into the event chain. The dialog's "open" and "focus" events are too soon. I need something like a "dialog opening animation is finished" callback. How can I hook up a callback to the end of the opening effect for a dialog?

    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

  • jquery validation of comtrols

    - by Vinodtiru
    Hi , I am looking at validation of some text boxes for somethings like required, minlength, max length, email etc... I am able to get examples that work fine on submit button on page. I want to do this validation on a button click which will only raise a ajax request and not submit of page. On internet all the sample is found was with submit button. Is there a easy way to change this code a little bit o make it work for non submit button click or any new jquery or java plugin to do the same. I am using the jquery.validation.js for now. This works with submit buttons. Any kind of help with suggestion or help is appreciated. Thanks in advance.

    Read the article

  • Using jQuery to listen for an AJAX load that is not loaded using jQuery.AJAX

    - by rich
    Okay, have a bit of a tricky one (for me anyway, i'm pretty rubbish at jQuery/JavaScript). I'm pulling in data using standard AJAX (ie, NOT using a framework like jQuery or whatnot... there is a reason for it) However, I then need to load up a jQuery script as soon as the page has been loaded in. So, here is the question, how do I bind the script once the DOM has been updated? I have been using Ariel Fleser's listen plugin (http://flesler.blogspot.com/2007/10/jquerylisten.html) for picking up on events such as clicks which works a treat, but I can't see how this can be used to listen for a load event. Any ideas? I'm pretty stumped on this one!!

    Read the article

  • How to Use JQuery Click Event on Button in an AJAX Form

    - by dpierre23
    I admittedly don't know much about JQuery but I have an AJAX page where I need to trigger a click event when someone clicks a button, but because the button is not there on the initial page load, I'm having issues using the click event. In my code, I just want to run a function when a button is clicked. <script type="text/javascript"> //Run function when button is clicked $(document).ready(function() { $("#idOfButton").click(function() { doSomething(); }); }); //The function I want ran when page visitor clicks button function doSomething() { //Do Something } </script> Obviously this code doesn't work, but any suggestions on how to use .click? I'm only able to insert JS via a tag management system, so I can't hard code anything into the page. Also, the JQuery version is 1.4, so I can't use .on. Thanks for your help.

    Read the article

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