ajax

How to extract images from a webpage as Facebook does ?

If I insert in my wall a link like this: http://blog.bonsai.tv/news/il-nuovo-vezzo-della-lega-nord-favorire-i-lombardi-alluniversita/ then facebook extract the image in the post and not the first image in the webpage ( not image logo or other little images for example ) !! How facebook does that ? ...

Prevent Recursive jQuery AJAX incrementing browser memory usage

I'm using recursive jQuery AJAX to callback values from the server every second. However, this seems to be incrementing the amount of memory usage my browser has. I'm using FireFox and I have FireBug installed which I believe to be the culprit as this logs every callback in its Console. My first question is, am I right in saying this i...

I'm using Ajax to populate my web page, but the populated HTML isn't working

I'm using Ajax to dynamically populate a DIV. I have each page content stored in XML files as CDATA. When a user clicks on a link from the navigation bar, the Ajax loads the XML for that particular page, parses it, and populates the DIV with it's content. Everything is working GREAT, except for one thing. I have a jQuery modal popup who...

Insert Mode with MaskedEditExtender

I am using asp.net with ajaxcontroltoolkit. I use the MaskedEditExtender frequently. In one case, I have a field that must be exactly 17 characters. If the user is typing in the string and they miss a character is the middle, they would like to go into insert mode to add a character. But insert mode does not appear to work. Is there some...

Questions about maxJsonLength in ASP.NET

Hi. Recently, I ran into a problem with my application: the size of the JSON string returned from the server was exceeding the default maxJsonLength. I've done some research and implemented some fixes including a variation of paging. Everything looks great at the moment. However, I still have some questions unanswered. First of all...

ajax recive xmt too huge

Hi, I am developing a website using ajax also. In particular, with ajax, I implemented the server by uploading files written by me. The files are of type xml. To send the parameters using Get: request.open("GET", url, true); request.onreadystatechange = function () {loadHandler(me)}; request.overrideMimeType('text/xml'); request.send(nu...

How to access AJAX hash values in ASP.NET MVC?

I'm considering using the hash method to create static urls to content that is managed by ajax calls in a Asp.Net MVC. The proof of concept i'm working on is a profile page /user/profile where one can browse and edit different sections. You could always ask for the following url /user/profile#password to access directly to you profile pa...

help using jquery .ajax() method to pass aggregate data to mvc2 action

Hi, I'm trying to use the jquery ajax function to post to a MVC2 controller action, but my parameters include an array of a (simple) custom class and the action is not getting the data correctly. Client: var element1 = { FirstName: 'Raymond', LastName: 'Burr' }; var element2 = { FirstName: 'Johnny', LastName: 'Five' }; var var2 = [el...

Passing ajax call to variable ( jquery )

Is there any way I can run this code with async:false? I notice the jQuery manual specifies that it must be true, when passing the call return to a variable, but that is painful considering the method is meant to be generic. ajaxCall.classFunction = function( $class, $function, $params){ //Ensure no errors occured $params = typeof($par...

Platform for web-based multi-player game?

I'm developing a web-based fantasy football game. Most of the game is a straight-forward web application built on top of Linux/Apache/Php/MySQL. I'm trying to figure out how to implement the draft application. The draft date and time will be scheduled in advance by each league's owner. Up to 32 users may be logged on for a given le...

how do i submit a form using get method in jquery

I am aware of sending form values using the method=get <FORM METHOD=get ACTION="test.html"> I have a textbox which captures email. When i submit form using the GET method the @ is converted to %40. I had read somewhere that Jquery could send the data across by serializing. How can it be done? Thanks ...

How to write this crawler in javascript ?

The idea is very simple: Imagine a simple white page with a form with a single input tag ( like google homepage ). When I insert a link of a blogpost in this form, then the javascript-crawler search the first image in the webpage of the blogpost ( through ajax ), show it in the white page and save it on my server. This crawler works li...

Ajax GET request turning into OPTION request

I'm experiencing a weird behavior with an ajax request on a godaddy shared linux server. The request works perfectly on many other servers I've tested it on, but on this one, the GET request turns into an OPTIONS request for some reason. Here's the js code (using mootools 1.1): var a = new Ajax(myurl,{ method: 'get', ...

How to do Search Engine Optimization for Web Applications

I am currently developing a single-page web application that is focused on functionality. It doesn't really have or need long paragraphs of text, and those that are there are loaded dynamically via javascript and AJAX. Normally search engine optimization tips revolve around getting the right word count percentages, etc. But what are th...

Facebook Graph API Question: How can i get permanent permission/access token to display a public photo album on a webpage?

I know it's possible to display public images once I have the access token, but how do I go about getting it? I found the facebook dev docs to be kind've confusing when it comes to extended permissions. Do i need to somehow register the image gallery/portfolio as an app and have the facebook user who's gallery it is allow it? Thanks f...

how to pass to fetch new records only with ajax/json

I have a DB containing small news and a web app displaying these. I would like to update my page every 60s with a jquery.ajax or jquery.getJSON request . My question is how should I pass the last id i received from the server to the next ajax request so that i got only newer news? Where do I store it (on the DOM, into a global var, or ...

Returning two things in one HttpResponse

I am trying to implement paging across ajax calls. The page should not refresh when the user wants to see the next x num of results. Here is my problem. Returning the QuerySet is super simple. I just do (sumaJson is custom) data = serializers.serialize('sumaJson', result_page.object_list, relations=('first_major', 'country_of_origin', ...

sequentially show mysql data using php

I have a php code that fetches data from mysql. The data has (say) 15 rows. I want to display only 5 rows at a time to the user, with links to each of the set (3 in this case) such that when a user clicks on either of the links, the same page will show the corresponding results. Since, php code has the final result set, I don't want a so...

ASP.NET ScriptService deserialization problem with derived types

I have a ScriptService web method (.NET 3.5) which takes a single parameter of an abstract base type: [WebMethod(EnableSession=true)] [ScriptMethod()] public bool Test(Item item) { ... } And: namespace Namespace { public abstract class Item { public int id; } public class Group : Item { public Item[] items; } public class I...

Is it possible for XHR HEAD requests to not follow redirects (301 302)

Is it possible to send an xhr HTTP HEAD request to only get header response for the first request and not automatically follow 301, 302 like redirects? I'm only interested in getting the new location of the url. Example: var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function(data) { if (xhr.readyState == 4) { if (...