Need pointers
Hi, Need pointers to advanced concepts of jQuery.....
load the mark up in a div using jquery during ajax call
Hi, How to load the returned content from an Ajax call using jquery into a div tag......plz
Function code update please (ajax)
This works for jquery version 1.3. I need help with the latest version please. When full shipment fields and shows a div "thanks for your comments" Demo: http://pruebasconjquery2012.netii.net/ $(document).ready(function() { $().ajaxStart(function() { $('#loading').show(); $('#result').hide(); }).ajaxStop(function() { $('#loading').hide(); $('#result').fadeIn('slow'); }); $('#myform').submit(function() { $.ajax({ type: 'POST',
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);
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 :)
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
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;
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
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
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,
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
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
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
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
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 :-)
Find GPS Postion on Smartphone
I'm doing some research if its possible to get the location of our user from the smartphone GPS. We don't have an APP made up its only in HTML using the smartphone's browser If there are any examples that would be great..
jQuery not executing as hide/reveal on portfolio pages
I'm building my site in WordPress and have attempted to implement jQuery as a hide-reveal on my portfolio pages (here is one example http://www.terryloweedwards.com/how-i-can-help-you/portfolio/writing-and-editing/). I made a page template and placed the PHP and jQuery in that page template. But it is not executing. Any thoughts?
Parent's Children
I have an accordian and I'm trying to access the parent of the open item and then the anchor child of that parent. The accordian works just fine, but when it's active, I want the anchor tag in the dt to change colors as well. HTML <dl id="ann"> <dt><a href="javascript:void(0);">Sunday <span>Click to Expand</span></a></dt> <dd class="active">Pellentesque fermentum dolor. Aliquam quam lectus, facilisis auctor, ultrices ut, elementum vulputate, nunc.</dd> <dt><a href="javascript:void(0);">Monday
problems with multiple form submission
hello ! I want to submit 4 ajax forms with one button..How can I do ? **For each form I have code like : forms <div id = \"tabs-5\" class = \"Formulaire\"><center> <textarea name = \"parcours_prof\" id = \"parcours_prof\" rows = \"20\" cols = \"100\">".$PARCOURS_PRO."</textarea><br />".$PARCPRO_BUTTON."</center> <br class = \"clear\" /> </div> submit button per form $PARCPRO_BUTTON = "<input type='button' name='parcpro_save' id='parcpro_save' value=\" Enregistrer
Noobie question regarding expanding text (access <div> by class)
Hi all, I've still have little experience handling jQuery. I want to click some header and expand (and collapse) some text. I've already achieved a little example with success: <html> <head> <script type="text/javascript" src="jquery/jquery-1.8.1.min.js"></script> <script type="text/javascript"> $(function() { $('h1').click(function() { $(this).next('p').toggle(); }); });
Cannot use 'in' operator to search for 'using' in false with JScrollpane and Jquery 1.8.1
Hi. I used jquery 1.6.1 with plugin JSrollpane, and then I pluged the newest 1.8.1 version of jquery. And it gives an error: Cannot use 'in' operator to search for 'using' in false Maybe somebody knows, what is this mean? And what should i do? Thanks in advance
Change class to change a click event on a div
Hi, Can anybody shed some light on this? I am trying to change the click event on a " #button_01" by changing the class name of the div when I click "#link_01" It seems to change the background colour through changing class though, so I know it is changing class. My code: <div id="button_wrp"> <div id="button_01" class="live_01">1</div> </div> $("#link_01").click(function(){ $("#button_wrp > div").attr("class",
How to clear browsers (IE, Firefox, Opera, Chrome) history using JQuery
How to clear browsers (IE, Firefox, Opera, Chrome) history using JQuery
Javascript code and Sharepoint 2007 weird request
Guys, I have a a strange request, generally the problem is that I've bit of a code generated by Sharepoint. It displays list of links containing user views in a form of dropdown menu. Now I don't want to have dropdown menu, instead I would like table with the same list of links that java script below code generate. Of course not after onclick but renders as page renders. I know, I know very bad idea but the issue is that I'm not site admin and I don't have privileges to do this in any other way /
How to use single jquery function for a control that used multiple times on page?
Hi, I have created a control (user control), which contains one hyperlink and one input textbox with two buttons. And I have written following code to hide and show text box onclick of hyperlink. It works fine when I use single controls on page. $(function () { $('div#divAddTag').add().css("display", "none"); }); $("a#addtag").click(function (event) { $('div#divAddTag'). add().css("display", "inline-block"); $(this).add().css("display", "none"); }); Now I
merge strings in jquery
hi ,i am trying to display similar strings in an array in a singel string seperated with "/". for example i hava an array like var arr ={ sportrs/ football,sports/basketball,sprots/baseball, news/bbc, news/cnn} i want to display arr as : - sport>football/basketball/baseball news > bbc/cnn. any help would be greatly apreciated. thank you.
Jquery.Ajax post queston
Hello everyone, I have a form that is being processed and validated by Jquery. I was just using a post to process the form and serializing it. The only issue is that it would submit into our database in Firefox, Chrome, and Safari but not any version of IE. Now I am using an $AJAX post. I also do not know if I have tied in all of my script together correctly. Any help is appreciated. Here is my scirpt: <script type="text/javascript"> $(document).ready(function(){ $("#formid").submit(function(event){
control <div>-contents to be displayed by checkboxes
Hi, I am trying to write an application where contents shoud be displayed in different <div>-containers according to checkboxes which are checked. index.html <form id="target" name="form" method="post" action=""> <input type="checkbox" name="layer" id="gia">GIA<br> <input type="checkbox" name="layer" id="terms">Terms<br> <input type="checkbox" name="layer" id="contact">Contact<br> <input type="submit" value=" Absenden "> </form> <div id="content_gia"></div> <div id="content_terms"></div>
Adding HoverIntent or Similar
I am trying to fix a bug with a dynamic menu we are using in Wordpress. The menu slides down when you hover over the main categories. Basically, the problem is the sub menu can be quite wide if you have 3 levels of sub navigation. So when the menu expands to the sub menu, most users will accidentally slide over an adjacent parent menu item and that will completely change the sub menu items. Frustrating. I found a function that accomplishes exactly what I need, it's called "HoverIntent". The problem
binding ajaxStart to a module object
hi all -- i can get around the problem below (with $(document)), but i'm trying to figure this out for future knowledge and understanding of jQuery binding and scope. i have a basic module, and i want to bind something like ajaxStart to it. var MyModule = (function($, my) { $(my).ajaxStart(function() { window.alert("ajax start"); } ); return my; }(jQuery, MyModule || {})); $(document).ready(function() { $.ajax(SOME_AJAX_SETTINGS); } ); the alert never appears. if i instead bind ajaxStart(...)
help related to jquery using web service
Hi Folks, I need to call a online web service and send request to it and receive some data from it in form of XML or JSON. I need to do this using jQuery. Can anyone please help me do it with simple example. Thanks in advance,
Disabling input fields in a form causing Javascript error in IE 7 (works fine in Firefox)
I have a form in which I am disabling all the input fields that is not hidden on jQuery(document).ready(function()) Here is my code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <div xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jsp/jstl/core" lang="en" xml:lang="en"
Animation twitching
Hi there, i'm trying to make a div that can slide to the left without using jQuery UI, but for some reason the right border of a div twitches during animation. I would appreciate if you could help me. Here is my code: var black = $('div.first'), red = $('div.second'); $(black).hover( function(){ $(red).animate({ left: '-200px', width: '200px' }, 2000 ); }, function(){ $(red).animate({ left: '0', width: '0' } ,2000 ); } ); Thank you!
Next Page