jQuery.ajax(): A listing of allowed values for property contentType, other than default ?
Hi For jQuery.ajax(), is there a listing of the allowed values that can be assigned to property contentType that it can process? I am performing jQuery.ajax() with the following property settings: type is "post" and dataType is "json" . Property contentType's default value is: "application/x-www-form-urlencoded; charset=UTF-8" , and if I assign the same default value to this property, then jQuery.ajax() works fine and creates a well-formed POST request body. However, if I use "application/json;
Pause jQuery until function has ran.
Hi Guys, I'm having a little problem. Basically I'm loading a option list from an .ajax post: <script type="text/javascript"> $(document).ready(function(){ $('.model_id').change(function() { $.ajax({ type:'POST', url: 'http://mydomain.net/getmodel.php', data: { make_id: $('.model_id').val() }, datatype: "html", success:function(data){ $('.result').html(data);
Collapse content on day of the week
Hello, I just started to make my first mobile website but i want to collapse a content block on the day of the week. So content block "wednesday" opens on wednesday and content block "friday" opens on friday. is there an easy solution?
How to addClass name?
I want to check if normalDay > div has class name selfOwned and i want to add class name to normalDay. i try to addClass but it add to each normalDay. <td class="normalDay"> <div class="selfOwned"> </td> Thank you
jQuery facebook like popbox top navigation
i just want to make facebook like popbox top navigation as below: http://i.stack.imgur.com/kQqJi.png the problem is, how to toggle another popbox named POPBOX2 with btn2, POPBOX3 with btn3 and so on. The LAYOUT of popBox2 and popBox3 same as popBox1, but the arrow of the popBox is under the btn. How to do this? i've copied my problem at this fiddle http://jsfiddle.net/FArIZzX77/dNVUj/ thanks for the answer :)
Jquery mobile selectmenu is not refreshing when history back button clicks (browser back) button..?
I have the select menu with options . Based on the selected options pages are navigate. But when i hit the browser back button the previous selected option is appears on the present page as a selected one. I tried with selectmenu('refresh',true). it doesn't work for me.. Please give me any suggestions on this.... Thanks
Submit jsessionid with $.getJSON or $.ajax()
Good Day I'm making use of href URI e.g <a href='<%=response.encodeURL("/navigate/home")%>'> which gets translated to something like /navigate/home;jsessionid=123456789, only when browser cookies are disabled. (The jsessionid is used for user httpsession tracking on the server side) Question: When using $.getJSON("/navigate/home") or $.ajax("/navigate/home") post/put/delete, how can I manage to append the jsessionid like the above example, only in case when browser cookies are disabled? Or can it
Plz suggest me jquery for pop new html page
when i click on link it should popup with new html page Plz suggest me jquery for pop new html page
Jquery datepicker Error on Rails Ruby Project
Dear All, I use in my ruby on rails project jquery datepicker. using jquery-ui-1.8.23.custom.min.js and jquery-1.8.2.js. My Html Form include start and end date only. My code is <script type='text/javascript'> $(document).ready(function(){ $("#start").datepicker({dateFormat: "yy-mm-dd"}); $("#end").datepicker({dateFormat: "yy-mm-dd"}); }); </script> ..................x................ with this, Datepicker work only first_time . Next time browser postback or refresh , datepicker not
How to force keyboard open
I tried to use focus API, but it doesn't work, how to force the device keyboard open.
JQuery Mobile version 1.1.1 Single page template - No loading message
Hi all, I am using JQM version 1.1.1 on a single page template. Apparently the loading spinner should show be default on a single page template? If this is the case, for some reason I my loading spinner is not showing at all when navigating from page to page. Any ideas why anyone? Thanks
Problem in the Dialog Resize
Hi Guys, Here i am pasting what i wrote can any correct it please <script type="text/javascript"> $(document).ready(function () { $("#ahrefedit").click(function () { var url = this.href; var dialog = $('<iframe src="' + url + '" frameborder="0" ></iframe>').appendTo('body'); dialog.dialog({ modal: true, open: function (type, data) { $(this).parent().appendTo("form"); } }); return false;
Alert like facebook, if user's session expired
Hi everybody, I want to alert message using javascript, if user's logged in session is expired. What i have to do? Please help. Thanks Madan
Track Browser close event using jquery
Hi everybody, I want to track the browser close event to logout the user if they close the browser. Please help. Thanks Madan Kumar
Ajax callbacks fire in wrong order
psuedo code: when( x, y ).then(z) where y is a call to a function that make an ajax call as in : function y(......){ var p = $.ajax(...........); p.done(callMeFirst); return p; } now from my understanding on a successful ajax call 'callMeFirst' should fire first followed by 'z' but what happens is that 'z' fires first and then 'callMeFIrst' I don't get why that is happening or how to fix it as all our ajax calls run thru 'y' and its post call processing is needed before any other callback get
Which radio button is selected? And do something according to that
Hello. I'm quite new to jQuery. Is it possible to make code which can read which radio button is selected in a speciffic form and according to that do another action? If it is possible please post it here :) Thank you
Mobile app deployments
Hallo People, I have a mobile app that use Jquery Mobile. The app has PHP pages that pull data from MySQL database. What is the best way to deploy this kind of an app in Android or iOS phones.
jQuery path
<html> <head> <script type="text/javascript" src="jQuery-1.7.min.js"></script> <script type="text/javascript" src="demo1.js"></script> </head> <body> <li id="nav_upcoming"> <a id="upcum">Upcoming</a> <div id="list" style="width:140px; display:none;"> <ul> <li><a id="weekend" href="#">This Weekend</a></li> <li><a id="next" href="#">Next Thirty</a></li> </ul>
JQuery Ajax call to servlet in another application in same server
Hi, I have a requirement where i need to make an Jquery ajax call to a servlet inside another application but deployed within the same server. The calling UI and the responding servlet belong to two different web applications. Is it possible to make an ajax call like this. This does not come under the cross domain issue as both the applications reside within the same domain..Kindly give me a sample code
JQueryMobile 1.2 rc-2 has the same problem
Hi all, The code below was working very well with jquerymovile 1.1 and 1.2 alfa without this problem. But when I try it with 1.2 rc-1 and 1.2 rc-2 ant this does not work. <div data-role="header" id="menubar"> <div data-role="navbar" data-mini="true"> <ul> <li><a href="#bro?tipo=uno" data-role="button">Uno</a></li> <li><a href="#bro?tipo=dos" data-role="button">Dos</a></li> <li><a href="#bro?tipo=tres" data-role="button">Tres</a></li> </ul> </div> </div> It is supposed that, clicking over each button,
Creating a list view database
Hello, I am in the process of creating a mobile application using html5 and jQuery mobile. I have an excel database from a website that is a directory of categories and names. I am trying to import this database into my app and make it searchable using lists (there are 4 tiers of information). Is there away I can import this information into my application without having to build a page for every tier of information? I hope that makes sense. Thanks in advanced for any assistance.
Thumbnail strip with hover effect
Please have a look at below links 1) http://www.vw.com/en/models/jetta/features.html#/flash=5efdcb3fd9aab01a3a00e2c8f0f8568e@Performance 2) http://www.vw.com/en/models/jetta/gallery.html The above links corresponds to a filmstrip(at the bottom of the banner image) developed in flash. I am looking forward to generate similar effect using jquery. The plugin i am looking for could be any gallery plugin which has this type of thumbnail strip or any working example which produces this effect. Please
Conditionally remove blur
I have a textbox that is on the page to accept a barcode scanners output. In most cases this textbox must never loose focus. So I added this.. $('#barcode').blur(function () { setTimeout(function () { $('#barcode').focus(); }, 100); }); So far so good. However I have a condition were if the scanned item for some reason is not found, a div appears which contains a simple form where they can manually enter the item information. Here is the problem. If this div and
Is it ok to declare same window events multiple times in jQuery?
I have a few elements listening to window resize and scroll events. In order to make the code clear for reading, I declared same window events multiple times in different blocks, like the following... $('#foo')... $(window).resize(function() { $('#foo')... }); // lots of code... $('#bar')... $(window).resize(function() { $('#bar')... }); // and so on.. where I believe generally it should be written as $(window).resize(function() { $('#foo')... $('#bar')... }); // lots of code
BUG: jQuery.ajax: contentType messing w\ HTTP POST Request with FireFox and Chrome, but not IE9
Hi I "googled" around about how to define expected content-type for a POST to be "application/json", but it immedately fails with jqXHR.statusText = "error" and nothing more. Is contentType attribute deprecated? What is it erroring? Is defining dataType: "json" sufficient? $.ajax({ url: url, type: "post", dataType: "json", contentType: "application/json", data: data, success: successCallback,
Point of sale style list
jQuery and Javascript are rather foreign to me. PHP is my thing just cant get my head around javascript and such. So my sticking point is this: I am looking for something like this: http://www.codemashups.com/source/jquery/jquery-autocomplete-p1/ I need the user to be able to enter a product description then they can select the right one in the drop down box. Then it fills in the rest of the form jumps to the number needed the user enters that presses enter and you can then add more items. Then it
Too many dividers after refreshing listview while a filter criteria is present
Use case: I have an application with facebook integration. I want them to be able to select friends. When they select a friend, I add it to another list and remove it from the source list. I set up the first list with auto dividers and enabled filtering. When the user chooses a facebook friend, I remove the <li> from the list view and call refresh. Issue: User enters part of the name as a search filter User picks a friend I remove the LI from the UL (listview) I call listview("refresh") on it All
How to pass data to javascript function in jsRender
HI , I am using jsrender template to display data ,inside the template i need to call a javascript/jquery function and pass parameter from jsrender.Kinldy help me to solve this issue.
Bind to all namespaces of custom jquery event
I would like a way to bind to all namespaces of an event or effectively ignore that the event is namespaced. $('#test').on('custom', function(){ ... }); $('#test').trigger('custom.namespace1'); $('#test').trigger('custom.namespace2'); The fired event of 'custom' will not be caught because it is namespaced. Something like binding to custom.* would be very useful in order to bind to all events of type custom, regardless of namespace. Stackoverflow thread that prompted this post: http://stackoverflow.com/questions/12590231/bind-to-all-namespaces-of-custom-jquery-event
How to use a variable in / across a "dot operator" or across widget options
I have an Autocomplete and I change some of the choices in the dropdown list via the renderItem function. That much works. If the user selects a changed choice, I want to make a different select: than if they select an unchanged choice in the list. So far, a click on a changed choice causes the select: option to do its normal thing. It seems I need to change a variable from 0 to 1 when changed choices appear, and then use an if statement in the select: option to determine which select action to
check box selecting
Hello , I am trying to implement one senario here, what I am doing is I have a accordion with three categories for example Category 1, Category 2 and Category 3. When I click category 1 I have check boxes options like catergory1_1,catergory1_2,catergory1_3 and when I click category 2 I have check boxes options like catergory2_1,catergory2_2,catergory2_3 and when I click category 3 I have check boxes options like catergory3_1,catergory3_2,catergory3_3. What I am doing right now is I am selecting
Changed value of cloned input does not display
I'm trying to clone an existing table row and then append it to the end of the table. Problem is, for whatever reason, when I change the value of the input box, it still keeps the old value. I can set the id of the field just fine, and when I output the value of the field, it says the correct value, but does not reflect when the row is appended. I have a fiddle here http://jsfiddle.net/fqTpy/9/ that demonstrates what I'm talking about. I have some alerts to ouput various data throughout. It
Tablesorter Plugin: Sort Alpha is only working in one direction
Hi, I have a sort parser working on a table: Table - parser for the 'Companies' column If anyone could tell me why it only works in one direction, that would be great. code is this: //table functionality var id = -1; // add parser through the tablesorter addParser method $.tablesorter.addParser({ // set a unique id id: 'companies', is: function(s) { // return false so this parser is not auto detected return false; },
Capturing Form Data and submitting to an Ajax call
I am just getting started here and have this working fine for me. It retrieves 4 items from a flicker feed. (Look familiar?) <!DOCTYPE = html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>My Test Page</title> <script type = "text/javascript" src = "jquery.js"></script> <div id=rating></div> </head> <body> <h1>Flicker feed</h1> <div id="images"></div> <script> // Start after document has loaded) $(function(){ RunAjax() }); // This is what you run function RunAjax() { var tag
$.each problem illegal character at the end of each
guys im having trouble on getting all the data in the table. someone suggested me to use $.each() function but my firebug keep on giving me illegal character on the }); at the end of the $.each(). i checked if i supply the correct number of }); and they all have the sufficient supply of }); here is the code HTML: <div id="wrap-body"> <form action="" method="post"> <input type="text" name="username" id="username"> <input type="text" name="msg" id="msg"> <input type="button"
hi, who has idea how to list a plain object array like this style?
var ShoppingCat = {}; ShoppingCat.Array = []; ShoppingCat.Array['a'] = 'b'; ShoppingCat.Array['c'] = 'd'; ShoppingCat.Array['e'] = 'f'; but if use $.each(ShoppingCat.Array, function(k,v) {}) ,it seems error? somebody knows how to fix? thanks
Dialog doesn't seem to wanna play ball
Hi, I'm really struggling to get this damn dialog window working :( I want it to open up in a window which would then get submitted via AJAX. Thus far I have: <a href="/cgi-bin/links/contact.cgi?t=mobile_en;ID=<%ID%>" data-rel="dialog" data-mini="true" data-role="button" data-inline="true">Contact Owner</a> ...and in that page it just has: foo bar as the contents Yet it doesn't wanna work :/ First of all I couldn't even get it to open the window. That turned out to be due to a flag I set on page
icons repeated in menu
hi, so i need your help, i'm trying to use jquery mobile, and the icons of this, i am using html li elements for a menu, but the problem is that the icons repeated themselves, so what i saw happens is that the span appear more than once, i don't know how or where can i solve the problem, thank you
Popup and dialog failed
<div data-role="page"> <div data-role="header"> <h3>test</h3> </div> <div data-role="content"> <a href="#memo" data-role="button" data-rel="popup">memo</a> </div> </div> <div id="memo" data-role="popup"> <div data-role="header"> <a data-role="button" data-rel="back">close</a> <h3>I am memo</h3> </div> <div data-role="content"> <p>I am content</p> </div> </div> If use external link, the dialog
Vertical Scroll with Looping Functionality
Hi there, I'm trying to make sense of this and hope someone has advice. Here's what I'm trying to do: - Create a vertical scroller that contains various terms that loops (when you get to the last one, the first appears. The terms will all be selectable, but that's pulled from elsewhere. Think of it looking like The Price is Right wheel. If you know of any code that does this, or have insight, let me know! Thanks :-)
Next Page