Skip to main content

Posts

Showing posts with the label jquery-ajax

Jquery UI slider how to make a box follow the handler?

I am trying to create a div that should follow the handler as it is seen here: http://m1.dk/Priser/#tab:#calc,#abb

AJAX to Sharepoint Server with Phonegap and JQuery Mobile not working

I have the following Problem. In the Phonegap App(for Android) I want to make an AJAX-Call to connect with a Sharepoint Server, with the following Code: $.ajax({ url:"https://xxx/_vti_bin/lists.asmx", beforeSend: function( xhr ){ xhr.setRequestHeader( "SOAPAction", "http://schemas.microsoft.com/sharepoint/soap/GetListCollection" ); xhr.setRequestHeader("Content-Type","text/xml; charset=utf-8"); }, dataType:"xml", contentType: "application/xml; charset=utf-8", timeout:10000, type:'POST', cache: false, username: "username", password: "password", data: soapEnv, success:function(data) { // alert data var serializer = new XMLSerializer(); serialized = serializer.serializeToString(data); alert(serialized); }, error:function(XMLHttpRequest,textStatus, errorThrown) { // alert errors aler

Using jquery.calculation.js with dynamically added form fields

I'm creating a form with dynamically added fields and would like to sum all added fields. So far I have the following code, but it only sums the first row: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Totals</title> <script type="text/javascript" src="../js/jquery/jquery-1.6.2.js"></script> <script type="text/javascript" src="../js/jquery/jquery.calculation.js"></script> <script type="text/javascript"> //Sum $(document).ready( function (){ $('input[name^=reds]').sum("keyup", "#totalSumReds"); $("input[name^=blues]").sum("keyup", "#totalSumBlues"); } ); </script> <script type="text/javascript"> //Add/remove form fields jQuery(func

Long loading times (or not even loading) with jQiery $.ajax on mobile Safari

I'm working on a web app completely made in JS (using jQery) and HTML. I discovered a problem with $.ajax and / or $.get calls which do not load or take veeery long to load. $.ajax({ dataType: 'jsonp', jsonp: 'callBack', url: 'http://mmsrv.local/character/userb', success: function(ret) { $('.charName').text(ret.data.name); $('.charLevel').text(ret.data.level); $('.charExp').text(ret.data.exp); } }); This is my code to load jsonp. At first I thought it's a problem with unsupported jsonp. But even the following code does not work $.get({ url: 'http://localhost/', success: function(data) { alert(data); } }); The 2nd snippet works perfectly on desktop browser, but not on Mobile Safari. The first one loads well in Desktop browser but goes into a "loading-loop" when visited on Mobil

Resend AJAX request with link?

Is there anyway to reload just the AJAX request, so that it updates the content pulled from the external site in the code below? $(document).ready(function () { var mySearch = $('input#id_search').quicksearch('#content table', { clearSearch: '#clearsearch', }); var container = $('#content'); function doAjax(url) { if (url.match('^http')) { $.getJSON("http://query.yahooapis.com/v1/public/yql?"+ "q=select%20*%20from%20html%20where%20url%3D%22"+ encodeURIComponent(url)+ "%22&format=xml'&callback=?", function (data) { if (data.results[0]) { var fullResponse = $(filterData(data.results[0])), justTable = fullResponse.find("table"); container.append(justTable); mySearch.cache()