ajax

AJAX call like Facebook

Hi all, I want to create a little social network (a little test). How can i implements period ajax call like Facebook ? I need to update news, status,... How does it Facebook ? ...

XHR readyState = 4 but Status = 0 in Google Chrome Browser

Hello i'v got a strange Problem with an AJAX call on my site. I make a simple AJAX call to a Script on my site. But the AJAX call fails with readState=4 and Staus = 0. There's no cross domain problem because the script i want to call is on my server. $.ajax({ type:"GET", url: 'http://mydomain.com/...

How to load ajax contents into a div on page load using FBML and FBJS?

I'm developing my first Facebook application in ASP.NET 2.0 and doing a simplest thing, i.e. to show a navigation on top with four hyperlinks where each link targets to another .aspx page. Please if someone can help me doing this using FBML in ASP.NET 2.0. Other wise coming to my question, where i'm struck after trying above thing at my...

success handler for $.ajax function with a non-standard http status code

We've written a RESTful server API. For whatever reason, we made the decision that for DELETEs, we would like to return a 204 (No Content) status code, with an empty response. I'm trying to call this from jQuery, passing in a success handler and setting the verb to DELETE: jQuery.ajax({ type:'DELETE', url: url, success: ca...

jQuery highlighting with ASP:UpdatePanel

I'm currently working with the AJAX:UpdatePanelAnimationExtender and I've implemented it in code behind which is currently working perfectly but I've ran into a problem with using the UpdatePanelAnimationExtender and an ASP:Repeater. I've been messing around with different ways of implementing it but nothing has worked correctly... I've...

ASP.NET - Load user control using AJAX?

Hi all, I'm not sure if what I'm trying to do is possible - pretty much I just want to call a user control using AJAX and get the rendered html of the control. However, when I try and fetch the control I get the following error message: This type of page is not served. Description: The type of page you have requested is not served bec...

jQuery event when hash tag (or any character) is typed!

I have a textarea field on my website and I'd like to use jQuery to trigger an event when a user types the hash tag. Similar to the trend of websites like Facebook and Twitter who allow you to query a database for friends as you type after you type a hash tag or use the '@' symbol. Would anyone be able to provide a plugin or example of...

jQuery - consuming JSON resources - some return data, others don't. Why?

I'm trying to figure out how to consume json URLs in the browser and render the data in my web pages using DOM. I am not getting a consistent or predictable response. I found a JSON URL at Google Calendar which shows the json response in my browser if I just type the URL in the address bar. I found another JSON URL at business.gov whi...

Set Headers with jQuery.ajax and JSONP?

I am trying to access google docs with jQuery. Here's what I have so far: var token = "my-auth-token"; $.ajax({ url: "http://docs.google.com/feeds/documents/private/full?max-results=1&alt=json", dataType: 'jsonp', beforeSend: function(xhr) { xhr.setRequestHeader("Authorization", "GoogleLogin auth=" + token); }, succes...

Is it Possible to Make Cross-Domain Requests in Javascript AND Set Custom Headers?

Since you can't apply custom headers on JSONP calls, how do I make cross domain requests AND apply custom headers using jQuery? I'm basically trying to access google docs with jQuery and need to pass an authentication token: var token = "my-auth-token"; $.ajax({ url: "http://docs.google.com/feeds/documents/private/full?max-results=1&...

How to generate non-prefix autocomplete suggestions?

I would like to add autocomplete to my tagging functionality. A couple of questions: How do I generate a list of autocomplete suggestions that includes matches in both the prefix and the middle of string? For example, if the user type "auto", the autocomplete suggestions should include terms such as "autocomplete" and "build automat...

jquery submit function not working

Hi, thanks for looking. I'm having an issue i cant seem to get the submit function workin. load login form if needed. login_box_comment = function(){ $("body").append('<div id="login_form_modal" style="display:none">'+ '<div id="status" align="left">'+ '<center><h1><img src="/ext/login/img/key.png" align="absmiddle">&nbsp;LOGIN</h1>...

select box (combo) is not responding

Hello I am using following javacript code $("a.adminlink").click(function(){ $("#bigpopup").fadeIn(); //$("a.activetablink").removeClass("activetablink"); //$("a.tablink[href=" + $(this).attr("href") + "]").addClass("activetablink"); $.get($(this).attr("href"),{},function(response){ $("#tabmenu").html(response.menu); ...

Differences/Advantages of using JSON over XML or vice versa?

Possible Duplicate: When to prefer JSON over XML? i wonder if JSON is the preferred choice for AJAX transfers (if this is what its called) over XML? i see that usually JSON is used in jQuery docs over XML? ...

Help me understand how google maps show images ?

With firebugs net tab open i stated zooming in and out of google map and i found its making requests for the png images. Ok with this i understood that we can request the images using the Ajax. but wait ? i always used to request html, jsox, txt and xml. Image ........ its strange for me ? Can some one please elaborate on this ? Also i...

JSF 2 composite:actionSource exposing commandButtons in ui:repeat

Hi, In my composite component, I have a ui:repeat that has, among other static things, a command button, like this: <ui:repeat var="article" value="#{cc.attrs.articleList}"strong>Aricle: #{article}</strong> <h:commandButton id="addToFavs" value="Subscribe" binding="..." type="..." > <f:setPropertyActionListener value="#...

XMLHttpRequest not working with http

Below code is working properly now. But if I replace 'text.txt' with 'http://google.com' isn't showing anything, nor displaying an error. What am I doing wrong? I need this code to get content of an url to a string, on client side. Thakns. <script type="text/javascript"> var webUrl = 'text.txt'; var queryString = ''; var xmlText = g...

Couple PHP with AJAX States

Hey everyone, I have a puzzling problem with trying to make an ajax/static state program. What I am trying to do is allow a static linked app have ajax dynamic urls and everything is kinda fine until a page refresh. The problem: PHP Does not see the hash so it only sees the original URI request. So PHP loads the original page but then...

How to make django messages StackOverflow style?

I'd like to use Django's Messages module, however, I would like my messages to persist until the user clicks an X next to the message as opposed to having messages disappear as soon as the user reloads the page. I am stumped with two issues: How do I make the messages' context processor not delete the messages once they are accessed? Ho...

Ways to circumvent the same-origin policy

The same origin policy I wanted to make a community wiki regarding HTML/JS same-origin policies to hopefully help anyone searching for this topic. This is one of the most searched-for topics on SO and there is no consolidated wiki for it so here I go :) The same origin policy prevents a document or script loaded from one origin ...