Search Results

Search found 23820 results on 953 pages for 'jquery ui autocomplete'.

Page 115/953 | < Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >

  • jQuery get request against Sinatra does not get text

    - by jerhinesmith
    I have a very simple sinatra site that I'm trying to access via ajax through jQuery. To keep things incredibly simple, this code snippet: get '/behavior_count' do "60" end which returns "60" in the browser, shows up as an empty string when attempting to access the site via $.get in jQuery. The strange part is in Firebug, while the Response is empty, the HTTP header correctly describes Content-Length as 2, and I can see the request show up on the server. Is there something specific to Sinatra that isn't returning my data, or am I not using jQuery correctly? If it helps, I also tried this code: get '/behavior_count' do content_type 'text/plain', :charset => 'utf-8' "60" end and my jQuery looks like $.get('http://mysite:4567/behavior_count'); // Ignore the response, but // watch the request in firebug Any ideas?

    Read the article

  • is there an easy way to convert jquery code to javascript?

    - by davidsleeps
    hopefully the question doesn't sound stupid, but there are lots of examples out there of achieving certain things in javascript/dom using jQuery. Using jQuery is not always an option (or even a want) which can make understanding the examples of javascript solutions written in jQuery hard. Is there an easy way to convert jQuery code to regular javascript? I guess without having to access or understand the jQuery source code... edit (future readers): pretend there is a logical reason why jQuery isn't available!

    Read the article

  • Programmatically triggering events in Javascript for IE using jQuery

    - by Dan Herbert
    When an Event is triggered by a user in IE, it is set to the window.event object. The only way to see what triggered the event is by accessing the window.event object (as far as I know) This causes a problem in ASP.NET validators if an event is triggered programmatically, like when triggering an event through jQuery. In this case, the window.event object stores the last user-triggered event. When the onchange event is fired programmatically for a text box that has an ASP.NET validator attached to it, the validation breaks because it is looking at the element that fired last event, which is not the element the validator is for. Does anyone know a way around this? It seems like a problem that is solvable, but from looking online, most people just find ways to ignore the problem instead of solving it. To explain what I'm doing specifically: I'm using a jQuery time picker plugin on a text box that also has 2 ASP.NET validators associated with it. When the time is changed, I'm using an update panel to post back to the server to do some things dynamically, so I need the onchange event to fire in order to trigger the postback for that text box. The jQuery time picker operates by creating a hidden unordered list that is made visible when the text box is clicked. When one of the list items is clicked, the "change" event is fired programmatically for the text box through jQuery's change() method. Because the trigger for the event was a list item, IE sees the list item as the source of the event, not the text box, like it should. I'm not too concerned with this ASP.NET validator working as soon as the text box is changed, I just need the "change" event to be processed so my postback event is called for the text box. The problem is that the validator throws an exception in IE which stops any event from being triggered. Firefox (and I assume other browsers) don't have this issue. Only IE due to the different event model. Has anyone encountered this and seen how to fix it? I've found this problem reported several other places, but they offer no solutions: jQuery's forum, with the jQuery UI Datepicker and an ASP.NET Validator ASP.NET forums, bug with ValidatorOnChange() function

    Read the article

  • adding a background color to search term results

    - by turborogue
    I'm trying to add a background color to a user submitted search result when a user enters a search term on a page (which is basically one big table). This is a text based search. I'm using jquery to show/hide the table rows that do not have the search term as text within the TR, but I'd ideally like to take the additional step of taking the search term (the entered value), and matching any of those text terms in the remaining (showing) rows and adding say a yellow background to the word(s). I know my syntax is currently wrong, just not sure what is correct:) Hopefully this is clear...any help is greatly appreciated! html of form: jquery: $("#searchsubmit").click(function () { var searchexp = document.getElementById('searchbox').value; $("table tr").hide(); $("table tr.header").show(); $('tr:contains('+ searchexp +')').show(); $(searchexp).css('background-color','yellow'); });

    Read the article

  • FORM TIPS with jquery or other library

    - by xRobot
    This is a form validation for jquery: http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/ I need something like that but the tips has to appear when I select the input text form by clicking on it and has to dissapear when I select another input text form. Is there a way to do this with jquery, mootools, scriptaculus or any other library ? Thanks ^_^

    Read the article

  • jQuery: what is it "forbidden" to do in plain Javascript

    - by flybywire
    A jQuery best practices question. I am writing a very jQuery intensive web page. I am new to jQuery and notice its power, but as I come with heavy javascript experience and knowledge, my question is: What should be done in jQuery and what in plain javascript. For example, there are callbacks that send a plain DOM object as an argument. Should I use that or should I wrap it ( like $(this)). Does it matter if I do this.x=y or $(this).attr("x", y).

    Read the article

  • JQueryMobile 1.1.1 List items not anchoring to the left

    - by user1664935
    I'm trying to create a simple thumbnail list, the code is pretty much copied off jqm docs pages. However, when I use the code below the button element of the list isn't anchored to the left of the list item and instead appears centered...Can anyone help me? It's driving me crazy! I haven't got any styles in other than what is in the jquerymobile default page template <div id="listDiv" class="ui-content" data-role="main"> <div id="listInformation" data-role="content-primary"> <ul id="swipeMeChildrenList" data-role="listview" class="ui-listview"> <li data-corners="false" data-shadow="false" data-iconshadow="true" data-wrapperels="div" data-icon="arrow-r" data-iconpos="right" data-theme="c" class="ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-btn-up-c"> <div class="ui-btn-inner ui-li"> <div class="ui-btn-text"> <a href="index.html" class="ui-link-inherit"> <img src="images/album-p.jpg" class="ui-li-thumb"> <p>Ha</p> </a> </div> <span class="ui-icon ui-icon-arrow-r ui-icon-shadow">&nbsp;</span> </div> </li> </ul> </div> </div>

    Read the article

  • Load ascx via jQuery

    - by Raika
    Is there a way to load ascx file by jQuery? UPDATE: thanks to @Emmett and @Yads.i am use the handler and the ajax: jQuery.ajax({ type: "POST", //GET url: "Foo.ashx", data: '{}', contentType: "application/json; charset=utf-8", dataType: "json", success: function (response) { jQuery('#controlload').append(response.d); // or response }, error: function () { jQuery('#controlload').append('error'); } }); but i,m just getting an error. my ajax is wrong? Another Update : i am using error: function (xhr, ajaxOptions, thrownError) { jQuery('#controlload').append(thrownError); } and this what i get : Invalid JSON: Test =(this test is label inside my ascx) and my ascx file after Error!!! Another Update : my ascx file is somthing like this: <asp:DropDownList ID="ddl" runat="server" AutoPostBack="true"> <asp:ListItem>1</asp:ListItem> <asp:ListItem>2</asp:ListItem> </asp:DropDownList> <asp:Label ID="Label1" runat="server">Test</asp:Label> but when I call ajax i get this error in asp: :( Control 'ctl00_ddl' of type 'DropDownList' must be placed inside a form tag with runat=server.

    Read the article

  • DataAnnotations jQuery validation in asp.net mvc 2

    - by Anonimous
    Hi, I trying to use jQuery validation plugin with DataAnnotations in asp.net mvc 2 final. Now I'm using MicrosoftMvcValidation.js and it works. But I can't find way to work with jQuery validation. I read about MicrosoftMvcJQueryValidation.js. But I think that it is obsolete. How can I use DataAnnotations with jQuery validation plugin?

    Read the article

  • Jquery failure after site went live

    - by Brandon Condrey
    I have been designing a site for weeks using JQuery. I don't have a local server or a testing server so I just created a directory through FTP, '/testing'. Everything was working great in the testing directory. I attempted to go live tonight by moving all the files in '/testing' to the root directory and I changed all file paths and script sources accordingly. The site loads, but everything related to JQuery is non-functional. Javascript console gives errors of (just as an example from a plugin): '$.os.name' is not a function I'm at loss for what to do. I changed the paths referencing the JQuery library, installed a fresh copy of JQuery (to a new directory), etc. There is a wordpress installation in a different directory '/blog'. I've read about some compatibility issues with wordpress, but that seems to be related to using JQuery inside wordpress, which I am not. I'm not sure if any code would be beneficial since it was all functional in a different directory. Your help is greatly appreciated.

    Read the article

  • how to access jquery internal data?

    - by Unknown
    As you may or may not be aware as of jQuery 1.7 the whole event system was rewritten from the ground up. The codebase is much faster and with the new .on() method there is a lot of uniformity to wiring up event handlers. One used to be able to access the internal events data and investiate what events are registered on any given element, but recently this internal information has been hidden based on the following scenario... It seems that the "private" data is ALWAYS stored on the .data(jQuery.expando) - For "objects" where the deletion of the object should also delete its caches this makes some sense. In the realm of nodes however, I think we should store these "private" members in a separate (private) cache so that they don't pollute the object returned by $.fn.data()" Although I agree with the above change to hide the internal data, I have found having access to this information can be helpful for debugging and unit testing. What was the new way of getting the internal jquery event object in jQuery 1.7?

    Read the article

  • Re-opening closed dialog puts it in the start position after moving it

    - by semmelbroesel
    I'm using multiple instances of the JQuery-UI dialog along with draggable and resizable. Whenever I drag or resize one of the dialog boxes, the position and dimensions of the current box are saved to a database and then loaded the next time the page opens. This is working well. However, when I close a dialog box and re-open it using a button, jQuery sets the position of the box back to its original location in the center of the screen. Furthermore, I use a show effect to slide the box off to the left on closing and in from the left on re-opening. I found two ways to update its position when the slide in animation is done, however, it still slides into the center of the screen, and I have yet to find a way to get it to slide in towards the location it is supposed to have. Here are the parts of the code that play a part in this: $('.box').dialog({ closeOnEscape: false, hide: { effect: "drop", direction: 'left' }, beforeClose: function (evt, ui){ var $this = $(this); SavePos($this); // saves the dimensions to db }, dragStop: function() { var $this = $(this); SavePos($this); }, resizeStop: function() { var $this = $(this); SavePos($this); }, open: function() { var $this = $(this); $this.dialog('option', { show: { effect: "drop", direction: 'left'} } ); if (init) // meaning only load this code when the page has finished initializing { // tried it both ways - set the position before and after the effect - no success UpdatePos($this.attr('id')); // I tried this section with promise() and effect / complete - I found no difference $this.parent().promise().done(function() { UpdatePos($this.attr('id')); }); } } }); function UpdatePos(key) { // boxpos is an object holding the position for each box by the box's id var $this = $('#' + key); //console.log('updating pos for box ' + boxid); if ($this && $this.hasClass('ui-dialog-content')) { //console.log($this.dialog('widget').css('left')); $this.dialog('option', { width: boxpos[key].width, height: boxpos[key].height }); $this.dialog('widget').css({ left: boxpos[key].left + 'px', top: boxpos[key].top + 'px' }); //console.log('finished updating pos'); //console.log($this.dialog('widget').css('left')); } } The button that re-opens the box has this code on it to make that happen: var $box = $('#boxid'); if ($box) { if ($box.dialog('isOpen')) { $box.dialog('moveToTop'); } else { $box.dialog("open") } } I don't know what jQuery-UI does to the box as it hides it (other than display:none) or to make it slide in, so maybe there's something I'm missing here that might help... Basically, I need JQuery to remember the box' position and put the box back into that location when it is re-opened. It took me days to make it this far, but this is one obstacle I have yet to overcome. Maybe there's a different way I can re-open the box? Thanks! EDIT: Forgot - this issue ONLY happens when I use my UpdatePos function to set the location of a box (i.e. on page load). When I drag a box with my mouse, close it, and re-open it, everything works. So I'm guessing there's one more storage location for the box' position that I'm missing here... EDIT2: After more messing with it, my code for debugging now looks like this: open: function() { var $this = $(this); console.log('box open'); console.log($this.dialog('widget').position()); // { top=0, left=-78.5} console.log($this.dialog('widget').css('left')); $this.dialog('option', { show: { effect: "drop", direction: 'left'} } ); if (init) { UpdatePos($this.attr('id')); $this.parent().promise().done(function() { console.log($this.dialog('widget').position()); // { top=313, left=641.5} console.log($this.dialog('widget').css('left')); UpdatePos($this.attr('id')); console.log($this.dialog('widget').position()); // { top=121, left=107} console.log($this.dialog('widget').css('left')); }); } The results I'm getting are: box open Object { top=0, left=-78.5} -78.5px Object { top=313, left=641.5} 641.5px Object { top=121, left=107} 107px So looks to me as if the widget is being moved off screen (left=-78.5) and then moved for the animation, and then my code moves it into the location that it should be in (121/107). The position() results for $box.position() or $box.dialog().position() do not change during this debugging section. Maybe this will help someone here - I'm still out of ideas here... ... and I just discovered that when I drag the item around myself, then close and re-open it, it is very unpredictable. Sometimes, it will end up in the correct location horizontally, but not vertically. Sometimes, it will end up back in the center of the screen...

    Read the article

  • jQuery plugin and prototype class

    - by Shanison
    Hi I am converting some prototype javascript to jQuery javascript. In prototype we can do Class.create to create a class. However, jQuery doesn't provide this. So I was thinking to rewrite the class into a jQuery plugin. Is this the best practice? My concern is that if I do all for the class, then I will add a lot of things to jQuery object. The other alternative is to use some extra lines of codes I found http://ejohn.org/blog/simple-javascript-inheritance/#postcomment. Then you can do the following: var Person = Class.extend({ init: function(isDancing){ this.dancing = isDancing; }, dance: function(){ return this.dancing; } }); Which one is better, please advise. Thank you very much!

    Read the article

  • can you use jquery datepickers renderCalendar with the multimonth plugin

    - by oo
    using jquery date picker you can render specific cells the way you want. (in my case i have a list of dates that i want to highlight as they are important days) i see that datepicker itself supports this here: http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendarCallback.html but i dont see the multimonth implementation having an option for renderingcustomDates http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiMonth3.html was this missed out in the implementation to expose this functionality?

    Read the article

  • using 2 different jquery releases on the same page

    - by Nat
    I am using this jquery plugin for a carousel controller http://sorgalla.com/projects/jcarousel/, it is based on jquery release 1.2.1 I also need to have tabs on the page, but when including the current jquery release in the page, the carousel stops working. Is there a way to have them both live together on the same page, or is there a way to have tabs work under realease 1.2.1? I rather not rebuild the carousel on another plugin, since this one is already skinned and works just as needed.

    Read the article

  • Jquery Form Validation Plugin Not Working

    - by nayanjyoti hazarika
    I try to validate a simple Form but the Jquery Validation Plugin not working when I use only Button not The Submit Button. I can not use the Submit button there Because If I use submit Button After Submitting the form It take the Action and goes to Default page while my current form is comes from Ajax. I am very new to Jquery. Please Help its Urgent... I am giving the files here. index.html <html> <head> <script src="jquery.js"> <script="jquery-validate-min.js"> <script="validation.js> </head> <body> <form id="contact_form"> <table> <tr><th>Name</th><td><input name="name" /></td></tr> <tr><th>E Mail</th><td><input name="email" /></td></tr> <tr><th><input type="button" name ="submit" id="form_sub" onclick="save"></th><td><input name="email" /></td></tr> </table> </form> </body> </html> Now the validation.js file function save(){ $("#form_sub").click(function(){ $("#contact_form").validate({ 'rules':{ 'name':{ 'required':true, 'minlength':5 }, 'email':{ 'required':true, 'email':true } } }) } Everything works fine when we use input type="submit"... But it not working when we use input type="button" Any Idea how can Fix this? I am new to Jquery ... Please Help

    Read the article

  • Safe json parsing with jquery?

    - by user246114
    Hi, I am using jquery with json. My client pages generate json, which I store on my server. The clients can then fetch the json back out later, parse, and show it. Since my clients are generating the json, it may not be safe. I think jquery uses eval() internally. Is that true? Is there a way to use the native json parsers from the browsers where available, otherwise fall back to manual parsing if not? I'm new to jquery so I don't know where I'd insert my own parsing code. I'm doing something like: $.ajax({ url: 'myservlet', type: 'GET', dataType: 'json', timeout: 1000, error: function(){ alert('Error loading JSON'); }, success: function(json){ alert("It worked!: " + json.name + ", " + json.grade); } }); so in the success() method, the json object is already parsed for me. Is there a way to catch it as a raw string first? Then I can decide whether to use the native parsers or manual parsing (hoping there's a jquery plugin for that..). The articles I'm reading are all from different years, so I don't know if jquery has already abandoned eval() already for json, Thank you

    Read the article

< Previous Page | 111 112 113 114 115 116 117 118 119 120 121 122  | Next Page >