ajax

How to create Real Time AJAX?

A good example of what I want is a chat system, where I send a message to someone and he can instantly see my message and vice versa. So I want the best way to track if in the database there is a new answer for me if yes then show it with AJAX. Example Websites: Twitter Friend Feed ...

How do you securely connect a flash application within an Ajax menu and keep the flash session when the Ajax menu is closed?

How do you securely connect a flash application within an Ajax menu - and keep the flash session when the Ajax menu is closed? Example, click the A-jax menu which slides open thus revealing a flash application - log into the flash app takes you do some other secure menus (it's connecting via secure connection) but when I close the a-jax...

Update a User Control from another User Control via AJAX

Maybe I'm having a brain fart or something because it seems like this should be pretty simple but how do you update a User Control from another User Control via Ajax? I have an ASPX page with two user controls and when I trigger a server-side event on one, I want to refresh a grid on the other so it'll update it's data. I'm using Teler...

Google Maps: Why should I load my InfoWindow via AJAX?

I stumped upon the following Google example page of loading my map marker InfoWindow using AJAX, instead of preloading the InfoWindow ahead of time. http://gmaps-utility-library-dev.googlecode.com/svn/tags/extinfowindow/1.2/examples/ajaxContent_packed.html However, I don't understand the use case for why someone would want to do this? ...

jQuery/Ajax call - It Doesn't work on IE7

Hi... i make a Jquery function that (for the moment) call a function dinamically and print it with an alert. with firefox, chrome : it works! when i try on IE7 (the first time), it fails. If i reload the page (F5) and retry , it works! o_O I FINALLY understand why that's happen. In my old website i used the jquery-1.3.2.min.js library. ...

How can I use Firebug to check data if the page is reloaded?

Hi, How can I use Firebug to check data if the page is reloaded (in the case of AJAX, etc.)? Thanks. ...

Should I use in this case post or get method for ajax form submission?

Hi, Should I use in this case method="post" or method="get" for ajax form submission? Update: When should be used post and when get in case of ajax form submission? <form action="script.php" method="post"> <label>Url: </label> <input value="http://" id="url-input" type="text" size="100" /><br /> <label>paste html file source: ...

Grails and AJAX: Grails form validation working using ModalBox or YUI2 Dialog ?

Several Grails applications, like the one I'm writing, require a /user view and /admin view that are 'dashboards', basically the user or admin lands on that page, possibly after a successful login and all the datatables and tabs are there, so they hardly ever need to navigate off that page, providing a more satisfying users experience, l...

jQueryUI autocomplete not working

I was using this code earlier today and it worked fine, then I apparantly changed something and it doesnt work. ive tried reinstalling jQueryUI but it doesnt help. <script type="text/javascript"> $(function() { function loadpage(webpage) { window.location.replace( webpage ); } $("#searchform").autocomplete({ ...

Question about JSON

If I console.log(result); I get {"MSG":"WRONG","QUESTIONID":182.0} But If I console.log(result.QUESTIONID); I get undefined What am I doing wrong? ...

anonymous function, add parameters

I use in my Ajax.Request my jsp. (Prototype) Somehow I can pass extra parameters in the anonymous function onComplete? For example, function save() { var pars = "param1=date"; new Ajax.Request('algo.ctr', { parameters: pars, onComplete: f, }); } var f = function (e) { alert(e.status); } I want to use ...

How to get value to dropdown from database using ajax ?

Hi, I have dropdown with some optional value.if change the those value based on that will display another dropdown with value from database.I am doing this process in jsp page.First dropdown values are static(coded in jsp).but second dropdown values are come from database when changeevent of first dropdown. Here i need to implement aja...

Can you use AJAX to echo out a file for download?

Hi, I wanted to let a user download a file by simply clicking a button. Thing is, the file doesn't actually exist - its just some dynamic content. So lets say: $('a.download').click(function(){ $.post('get.php'); }) and in my PHP: header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Dispos...

Rails AJAX request also calling entire original page

I'm using jQuery getScript in Rails to load an AJAX search on a dashboard page. I just noticed, though, that in addition to properly making the call it's ALSO reloading the entire page (in the background). I have no idea why this happening. I checked all my before_filters, all my authentication logic, I tried using different jQuery a...

ASP.net using AJAX- calendar extender..!!

wen i am trying to use AJAX calendar xtender--> gives me error like --> could not load type " system.web.ui.references" ?? ...

How do I check for an ajax request thats taking too long or just died out?

I'm using sajax here and at times my ajax queries seem to die out and theres no way for me to tell if something has gone wrong so I end up with an infinitely running preloader. What do I do? ...

JavaScript: Global variables after Ajax requests

the question is fairly simple and technical: var it_works = false; $.post("some_file.php", '', function(data) { it_works = true; }); alert(it_works); # false (yes, that 'alert' has to be here and not inside $.post itself) What I want to achieve is: alert(it_works); # true Is there a way to do that? If not can $.post() retu...

How to run some tasks in the background and put the results to a global memory hash?

I'm building a website with Rails which can let user check if some domains have been registered. The logic is designed like this: There is a text field on a page let users input some domain names When user click check button, the input will be post to the server server get the inputs, create a background task(which will be executed in ...

Does a jQuery.get() request act any differently from a normal web request?

i was just wondering if a jQuery.get() request have any difference to a normal web request. the reason why i am asking this is: i am doing a infinite scroller for my tumblr. it works well except that if there is a photoset, the returned HTML won't contain the JS/Embeds for the photoset and instead returns a raw version <p>s and <img> onl...

+1234567 ends up being 1234567... where is the plus?

Hi guys, Well through jquery i am doing an ajax request to send through a cell number in the format of +1234567 but if i access it on the other end using $_POST['cell']; the plus is gone, where could it be? ...