ajax

Handling JSON in JS/ERB template in Rails 3

I have no trouble making typical AJAX calls to and from Rails(3) with JSON objects and jQuery-rails (jQuery library plus a special rails.js file). In one controller, though, I want to RETURN some JSON in an erb template (create.js.erb) after an AJAX call. I've tried every combination of things in the controller (@object.to_json, '[{"co...

Ajax call not working in mozilla

My code is working fine in all the browser except mozilla firefox $(document).ready(function () { var id1 = '<%=ViewData["UserName"]%>'; var id2 = '<%=ViewData["UsrProfile"]%>'; var msg = $('#addFrnd').attr('value'); $.ajax( { type: "POST", ...

jQuery .ajax call fails when '0' is entered

I've created a guess-the-number game using jQuery and PHP, and while it works fine when a number is entered (and also handles non-numbers well), when 0 is entered the Ajax call fails. As far as I can tell, when 0 is entered the variable $guess sent to the server-side code isn't set properly, but I can't work out why - any ideas? Form in...

jquery ajax problem

Hi again everyone, thanks for every help that you guys have given me so far !! :D and now, i encounter some problem on me using jquery and ajax i am fetching all of my user's photos from my database, calling them out into a grid and then applying a jquery pagination plug-in 'pajinate' using this code $(function(){ $('#talent_pagin...

Real time updates display like friend feed or twitter top tweets

Hello Everyone, I am using pubsubhubbub to receive the recent updates on the feed. As soon as callback url receives the update, it should displayed in the web page like friend feed or twitter top tweets (content will move down as soon as new content arrives). Is there any library to do this? Jquery? Callback url receives the updates i...

AjaxControlToolkit.BlockingScripts missing in Ajax 3 ?

Hi all I have an old project that used an old Ajax control toolkit version we need to upgrade the project to framework 3.5 and Ajax version 3 we have a class that used the old AjaxControlToolkit.BlockingScripts class, but this class is missing in the new ajax version what can be the replacement for this class ? thanks ...

speed optimization techniques that sites like yotube and yahoo are using

I've been noticing quite a few websites including YouTube and http://video.yahoo.com/, amazon and Facebook are loading content above the fold and then once you scroll down the rest is loaded. I'm not sure if it's the rendering of the content that is being delayed or if its media such as images that are being fetched when you scroll down....

Refreshing table with Dajaxice in Django

I'm monitoring the temperature for different locations. I have the data stored in a model and have set my views.py, but I would like to refresh the table every 5 minutes. I'm new to ajax and dajaxice, how can I write the function so it displays in html? this is my views.py: def temperature(request): temperature_dict = {} for filter_...

Permission error when using Ajax on a protocol other than http

Hello, We are using a custom protocol handler to connect to an embedded device across firewalls, NAT etc. The solution is called Nabto. This works great - a plug-in on the user's computer handles requests to all nabto:// URIs and serves HTML pages with information about the current connections etc. Now, we would like to access Nabto fu...

PHP multiple logins

Hi, I have one site having a login feature ,what i want is that if a user is logged in to his account from one computer ,and then again if he logs into his same account at the same time from another computer he should be logged out of the computer which he logged in in the first instance .Any idea how to implement it will be great . ...

Ajax responding too quickly?

I have a jquery function that hooks a javascript function when my form table is created, only it seems to respond too quickly. My function being called is: function ValidateForm(CQID) { var dt=document.newDate.txtDate; if (isDate(dt.value)==false){ dt.focus(); return false; } populateDateTable(dt.value, CQID); ...

Ajax callback pop up window

Hello All, I have an Ajax callback function, which will load a html file and pop up the content of this HTMl file in a pop up window. It works so far, however, i want to get rid of the location bar in the pop up window. Here is my code function _checkPopUpUpdate() { var callback=new Object(); callback.success=this.o...

how to call php function in JS?

Hey there i have a php cart that i have done using class and functions, and when it came to deleting a selected item or all items, i wanted to use JS to do it, is there any way to accomplish it. ...

ASP.NET MVC AjaxForm onFailure - How to display error?

I have an Ajax Form that looks like this: <% using (Ajax.BeginForm("Update", new AjaxOptions { UpdateTargetId = "message", InsertionMode = InsertionMode.Replace, OnSuccess = "success", OnFailure = "error" })) { %> I can get "error" to run on a failure but i would like to alert the error message. How can i get this information...

Unable to load webpage after doing AJAX request

Hi, I have a page that does an AJAX request. This request can take a while to complete, sometimes over a minute. This is not an issue. During the AJAX request I am unable to load any other pages on the website. This is the same for any web browser. I understand that there are connection limits in the browser, IIS and ASP.NET - but all...

Implementing reCaptcha ajax api to an exiting webform that already uses ajax

I have a signup form on my home page which uses server side validation and ajax so my page doesn't refresh while validating. When all validation is passed my page is taken to a registered.html which is a temporary page for now. Later on it will be an account area. What I want I want to have 1 last step after the actual form validatio...

JSF: Is there a way to create animation effect when insert a new record into table?

I've been googling this question a lot and I dont seem to find a solution. I wonder if any developer out there that able to achieve this? I know there are couple ajax framework out there for JSF like Richfaces, primefaces, icefaces ... I have look at their showcase, and could not seems to find what I am looking for. ...

$.getJSON problem

Hi, I am creating an object for handling youtube api. In my object I have to methods : getCommentList - getting a url for the current upload,for example http://gdata.youtube.com/feeds/api/videos/VIDEO_ID/comments?alt=json and return an array of objects - author of the comment and the content of the comment. getEntriesObject - returni...

jQuery function to load Rails partial?

I have a jQuery function that updates my data ever few seconds. But! It's not parsing the javascript it's loading. It just calls it appropriately every few seconds, and replaces my content with unparsed javascript code. setupMediaIndexPoller: function(organization) { url = '/organizations/' + organization + '/media/photos_and_video...

Implement Ajax to keep background animation at same place throughout all pages.

I was wondering what the best way to keep my background.asp file playing throughout all of my web pages. My website www.marioplanet.com uses ASP #includes in order to keep certain parts of my website the same. So, if I want to change a link in my header, I just need to update 1 file. Now, I was wondering how to keep my background.asp f...