Consomer un web service distant via jquery (ajax)
Bonjour, J'ai un problème qui persiste depuis quelques jours. J'ai une solution qui contient deux projets(web service, et une application web) Je veux appeler le web service depuis l'application web et ce via jquery(ajax) je peux voir dans les traces de fiddler les données retournées par le web service, le problème et que la variable data de la méthode onSeccess est vide !!!! une idée ??? function Detail(clientId) { $.ajax({ type: "POST", cache: false, //crossDomain:
Firefox 21.0 and .each function broken
I am having problems with some javascript using the jQuery.each() function with Firefox 21.0 update. I found this, https://developer.mozilla.org/en-US/docs/Site_Compatibility_for_Firefox_20 Which says : JavaScript The for each...in loop has been virtually removed Bug 804834 – Hide "for each" from content While E4X has been deprecated and disabled from Firefox 17, the for each...in statement, standardized as a part of that, has been left for backward compatibility. In Firefox 20, a change has been
What I'm I doing wrong when trying to send data to an external database via jquery / ajax
I'm building a phonegap android app and trying to send data via the phone to an external database. I know the php side of things works as I wrote to the database and tested the variable etc but I think it's something wrong with the javascript side of thing but I have know idea what. Please help This is my index.html form that I want to send: (Clientside) <div id="sendInfomation" sendInfomation="1"> <form id="form"> <label for="phoneNumber"> <b>Phone Number</b>
How to Delete Account?
How do I delete my account
Do the timer reset in the masterpage in the each event call in the childpage, how?
Hello friends, this is my first post here, sorry for my bad grammar in English. I made this timer "defaultCountdown.js" shown in this below: $(function () { shortly = new Date(); shortly.setSeconds(shortly.getSeconds() + 1800); //since: new Date(2011, 12-1, 11), $('#defaultCountdown').countdown({ until: shortly, onExpiry: TempoAcabou, onTick: watchCountdown, onTick: highlightLast5, format: 'MS' }); function highlightLast5(periods) { if ($.countdown.periodsToSeconds(periods)
Script to uncover div
He, I have this example code <div id="leveltwoget"> <div id="TWO-A"><br /><br /> <input type="checkbox" name="a[]" value="a">a<br /><br /> <div class="hide" id="three-TWO-A"> <input type="checkbox" name="a[]" value="b">b<br /> <input type="checkbox" name="a[]" value="c">c<br /> <input type="checkbox" name="a[]" value="d">d<br />
Display sharepoint list to preformatted excel sheet when clicked on button using JSON ,javascript or Jquery
I have a sharepoint list which i want to export to preformatted excel sheet when clicked on a button. I want JSON values of list to be converted to Excel sheet.However I tried below mentioned code but in new window page was blank and we were getting tags in URL part. <div id="exportToExcel"> <table> <tr> <th>Col1</th> </tr> <tr> <td>row1</td> </tr> <tr> <td>row2</td> </tr> <tr> <td>row3</td> </tr> </table> </div> <input type="button" id="btnExcel" value="Export to Excel" /> Jquery
Reading this value
I have a div called 'item' that is output dynamically by jQuery. There may be any number of 'item' divs. Each 'item' has a checkbox and a span that has in it the itemID of the item itself. This image will explain it all. In the example above, the div 'searchresults' can have any number of div/item in it. What I'd like do to is have a 'click' function on the checkbox that reads the itemID from the span at the bottom. The click event bit is easy. $('.chkReorder').live('click', setReorderFlag);But once
Click event is Firing only at first time
I am having problem with jquery-1.9.1.min.js. This is simple task, it dynamically add and remove textboxes using click event, If i use jquery-1.9.1.min.js it only fires at first time see the demo http://demo.smarttutorials.net/check/sample1.html but if i use jquery-1.4.1.min.js the task works fine, http://demo.smarttutorials.net/check/sample.html What's is the problem with my below coding <script src='jquery-1.9.1.min.js'></script> <div id="advice" style="width: 300px; height: auto;"> <p>Advice
live working but not on()
Hi, I am using this line below $('.pagination ul li a').live('click', function (e) { which works fine. But with latest jQuery version, live is not supported, I need to switch to use 'on' event. I tried: $('.pagination').on('click', 'ul li a', function (e) { which didn't work. How to proceed further with this. Can any one explain me ?
multiple ajax success callback defer
In my javascript, I have the following scenario: call_A(success_A) call_B(success_B) fucntion call_A(success){ // make ajax request success(result) } function call_B(success){ //make ajax request success(result) } function success_A(){ //set data to be used by success_B } function success_B(){ ..do some stuff } I want to make both call_A and call_B one after the other so that ajax calls are made (to save time). I do not have the option for changing call_A and call_B function headers,
Submit an image by ajax
Another question for you ... Here there is the code complete: http://jsfiddle.net/LQN43/1/ I need to submit some data by ajax to a file php ... all so ok for the text bu not for the image ... i have this code HTML <label>Name:<label><input class="name" /><br> <label>Surname:<label><input class="surname" /><br> <input type="file" class="selectImage" id="selectedImageFile" /><br> <div style="border:1px solid; width:100px; height:100px"> <img id="uploadPreview" style="width:100%"/> </div> JQUERY
Why does my first function work but not the second one?
I am new to web development with jquery. I am trying to figure out why my first function works but my second one does not. <script type="text/javascript"> $(function () { $("#<%=ctlInHandDate.ClientID %>").datepicker(); }); $(function () { $("#<%=ctlSpecialRequest %>").change(function () { alert("here"); }); }); </script>
Creating a Modal Popup Using javascript Window.Open
Hi, how to make a popup opened using 'Window.open' appear as Modal,just like showmodaldialog.I can use showmodal dialog.beacuse i have some functionality using 'Window.opener'.If I use showmodal dialog above mentioned line will give and my functionality will not work. I am using a page which have a master page and content place holder. My Req: I want to make a popup window opened using window.open to appear as modal. Please help me
parseJSON issue - invalid json
Hello, I am trying to parse json using parseJSON but continually get an error stating Invalid Json. I have validated what I am passing along to parseJSON using http://jsonlint.com/ and it says it is valid so I am not certain what the issue is. Here is my json: [{"CATALOG_ID":1054,"SERIAL_NUMBER":"A8GT11001 \u0026 Above","ACTIVE_DATE":"08/12/2011","INACTIVE_DATE":null}] Anyone have any ideas? The error that I get when I run this through parseJSON() is Invalid JSON. Thanks.
Scroll Images up and then over lap them on top of each other
Hello quick question, i want to create an effect where the images scroll up the page and then get fixed at the top, when they reach the top they get stacked on top of each other sort of like this http://denicler.eu/en/lookbooks/2 ive set my z indexes on my images so when they reach the top they get stacked but cant seem to fix the images to the top when they reach it.. got this so far any help would be great... $(document).ready( function() { $(window).scroll( function() { if ($(window).scrollTop()
Get JSON data from a distant PHP server
I'm using jQuery-1.9 and i would like to get json data from a distant PHP server. I've tried with JSONP, but i didn't succed. If anyone can help me with a working solution by just creating a json file, and an html file using Javascript to get the json's content. It will be great! file.json must have an access via an url. file.html can be anywhere (desktop for example). Need your help guys !
Changing tabs by removing and adding class 'active'
Given the text "webmaster", how do I remove the class from the currently active tab (in this case, organization) and add the active class to "webmaster" for the listitem and its corresponding div below? Not sure if step 1 and 3 are correct, but I'm not sure how to do step 2. // Step 1: Remove all active classes because only the href and its corresponding div should have an active class. $('.nav-tabs li').removeClass('active'); // Step 2: Next step needs to be add the active class to the li that has
Sorting Table including rows having display property set to none
Hi all, I am new to Jquery and some how managed to use Tablesorter to enable sorting table in my html page. The problem now im facing is that i want to display only top n results based on the metrics and need to hide the other rows of the table. But when i sort the sorter takes only the rows that are visible (I use style=display:none to hide rows greater than n). I want the sorter function to consider all the rows for sorting
Problem with fin() and each()
The code will: 1. Gets the current url 2. Find the current url in xml3. Returns a new url and redirects to it What's is the error? $(document).ready(function () { $("#leerxml").click(function () { var urlactual = document.location.href; $.get("students.xml", {}, function (xml) { $(xml).find("urldirige").each(function () { if ($(this).find("url").text() == urlactual) { //do something document.location.href = $(this).find("reserva").text(); } }); }); }); });
jQuery Cascading drop down issue on dynamic table row
Hi Guys, This is regarding an issue related to the dynamic html table row controls, binded events. I have a 2x2 html table (which will be n x 25), where we do have cascading drop downs. I have succesfully implemented the cascading dropdown there. But, the problem coming is while I am adding new rows to the table dynamically, the cascading drop downs are not working any more, on child rows. But, it's working properly on the top row. The code is as below - HTML - <table style="border:1" id="tblForm">
How to determine print media in jQuery - not CSS
I have code that inserts some HTML code and then displays it, if appropriate. It's something like: $(document).ready(function() { $('#foo).prepend('<div class="bar" ......</div><div class="baz" ...</div>'); /* I need a test here to determine whether media is print so that I can skip the following line of code. */ $('.bar').css('display,'block'); }); The default for class .bar is "display:none"; I have a CSS file for print but because I change the display by javascript (jQuery) it doesn't work in
works in FireFox, Chrome but not in IE7 or 10
Hello everybody, totally lost why this simple script wont work in IE 7 ro in IE10, any help you can provide would be greatly appreciated. <!DOCTYPE> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready(function() { $('#btn_click').on('click', function() { var url = 'testingv2.php';
Floating dots ( each as menu elements)
Hi I want to make a JS menu which is in the shape of a web-og-dots . each dots are one element connected to every other dot . the connection is depends on a relationship . For exam : father (age,hobby..etc) ---- friend (age,hobby..etc) | | | | | wife (...) son (age,fav color ..etc) can some suggest any easy way to doit using framework? -Raj
How to get the image icons in the listview dynamically using jquery ?
Hi,i'm trying to get the images as icons in the listview dynamically in the home page. My code: http://jsfiddle.net/EpTeL/1/ I have 3 image icons like 0sel.png, 1sel.png, 2sel.png in the "icons folder".How can i get this icons in listview dynamically using jquery.Can anyone help me. i tried as: $("#section_list").append('<li><a href="#chapter" id="' + order + '"><img src="icons/' + url + '" id="image" alt="Picture"/>' + section + ' </a> </li>'); $list.find('li').find('img:eq(0)').addClass("ui-li-thumb").each(function()
Using Require.js with jQuery
Hello , I have folder called "scripts". And in this folder contains the following files : - Require.js . - jquery-2.0.0.js - Main.js In the "Main.js" , I write the following code : require.config({ paths: { "jquery": "scripts/jquery-2.0.0" } }); require(["jquery"], function ($) { $(function () {
how to Concate folder in js
here is my js images path url = '/uploads/' + url.replace(/^\/uploads\//, ''); whose path is /uploads/6/9/4/5/6945512/662006_orig.jpg I want to set path /media/945/_7594776.jpg but i don't know about how i set in my js
JQuery disabled on smaller screens?
I have searched and cant find anything relating to jquery behaviour on smaller screens. ON a smaller screen none of my jquery functions seem to work. It almosts seems like javascript is disabled but bootstrap still works. Please can somebody advise on how jquery works on smaller screens. Thanks in advance.
How to go to the next link dynamically using Jquery ?
Hi, this is my code: http://jsfiddle.net/SP6ww/4/ i want to go to the next link directly by click on the "next" button.For example in my code: when i'm in the "Balmy with perfumes" now when i click on the next button its directly go to the next link as "wear a fine dress" like this upto "Gain a womens heart" in "seduce your partner".like this for parent links. can anyone help me how to do this.. Thanks in Advance.
How to put a div in other div nd show him when th mouse is in the first or second div
Basically, i have 2 div with css(position:absolute) First div is it a 100x100, and second 30x30 The second div is hide and is located in the center of th first div. When the mouse is mouseover de the first div then show the second, and when is leave form first then hide the second div $('#div1').mouseover(function(){ $("#div2").show(); }); $('#div1').mouseout(function(){ $("#div2").hide(); }); it ok, but when i mouve the mouse on the second div then the mouseover property is hide the div and
PayPal Example
Hello, Does anyone have a paypal ajax example? Thank You
Reg Jqgrid inline edit
Hi I have a Jqgrid. I have pencil icon on it and on click of it, it behaves like inline edit. Now I have some message in my controller which I want to pass to client side and want to show on the page. How can I achieve it. I tried "before processing", "after submit" etc events but the control does not come to load complete, grid complete or above methods. So how is inline edit different. How tpo show a server message on the page after inline edit. Please suggest. Thanks & Regards, Usha.
submenu hide/show
Hello, i have a page using submenus http://sxrg-energy.com/pre/ttt/#/SXRG-lemon-lime-mint when i move over "testlink 0 " a submenu is opened. When i leave the submenu it shold closed i now have a hacked solution:) See Code below. But now its opens only on click and close on click on submenu. And the other problem ist, i must programm for every submenu this code. Can someone help me to find a better solution? thank you $("#menu ul li ul a").click(function () { $(".submenu1").css("display","none");
<select> box styling difference on safari and firefox, is there a jQuery solution?
I am trying to simply style my select box so the text is centre aligned. It works in firefox but not in safari or chrome. I am thinking someone might know a little bit of jQuery that might do this? http://georgewoolfe.com/yogurtline.html Thanks for your help. Angela
Facebook or LinkedIn style article widget?
Does anyone know of a plugin that will allow you to include articles on a website that performs in the way that the include widget does on Facebook or LinkedIn? 1. Paste a URL into text area. 2. Widget retrieves synopsis and images. 3. Thumbnail for included article can be selected. 4. Preview of article with link is posted. I have been doing some searching and I have some idea of how I would write this, but I don't want to re-invent the wheel. Thanks in advance!
How to call $.getJSON() in a for loop?
I am coming from the synchronous world and I have not grasped the concept of closures yet. I am trying to loop through an array of airport ids calling the getJSON method and build a new array with data from the returned json data for each airport. Could someone please look at the code below and explain how to make it work? Thanks in advance! var airportswx = []; for (key in airports) { obj = airports[key]; xdata = getwx(obj.apt); airportswx.push({ 'apt': obj.apt, 'name':
.on load
As you know `$(document).ready()` loads our script after DOM of browser loads. But what I need was waiting till page loads. So I used `$(document).on('load',...)` but it doesn't work. When I tried `$(window).on('load',...)` it worked. Why this doesn't work > $(document).on('load',...) but this works. > $(window).on('load',...)
Drop Down menu is hiding
Hi frens, I'm using drop down menu for my text site from http://www.dynamicdrive.com/dynamicindex1/flexdropdown.htm Now the problem is when I hover on Prophets the drop down menu is actually going up and hiding behind top bar. But rest of the menus are going down. What could be the reason? Can anyone solve this issue? Best Bomzon
Custom Modular Build
jQuery is really simple and the best javascript library... For the below build process, While building the javascript in my website, I do have many other javascript files to be downloaded by the website. Due to the network round-trip, most of the files even if they are 5KB or 20 KB, it takes the same amount of time. So I will like to club my javascript files inside the jquery.min...js in the build process. So finally I will have only one javascript file for my whole website to be download which is
get the size of each image
i have code like this <div id='image'> <img id='x' src='1.jpg'/> <span class='u'></span> </div> <div id='image'> <img id='x' src='5.jpg'/> <span class='u'></span> </div> Then, how to get the size of each image with ID "x" and applying text size image in <span class='u'></span> .....??? thanks before
Next Page