ajax

CakePHP 1.3: Detect ajax request in view

Before Cake 1.3 I would check for an ajax request with a simple $ajax->isAjax(). Now that the AjaxHelper has been deprecated, I'm looking for the proper way to check for an ajax request in my views. I can't find anything in the JsHelper or HtmlHelper methods. This seems like a really simple thing, I hope I'm not missing something obvious...

Display popup with text and graphics on mouse over

Hi, I want to have a popup window such that when the user hovers mouse over the image, it displays that popup window on the right of the image. The window would contain text as well as graphics. The window should close the moment my mouse is out of the image. I tried various scripts that are on the internet, but they show the text as i...

PHP and Curl - Get Ajax data

Is there a way to get data generated by AJAX using php Curl? Thank you. ...

Creating a nested remote_form within a regular form

I'm trying to create a nested remote_form within another non-remote form in one of my RoR apps. It looks likes this: form_for @event do |f| f.text_field :name remote_form_for @location do |d| d.text_field :address d.submit f.text_area :another f.submit end Of course it's more complicated than this, but...

Unable to append content coming back in JSON

I have the following JSON coming back: {"gameId":137.0,"memberId":3,"id":97.0,"reviewBody":"Great game! Awesome.","createdAt":"October, 13 2010 18:55:34"} I'm trying to append it to a layer using the following JavaScript, but nothing is showing: $(function(){ $(".review-form").submit(function(){ dataString = $(".review-fo...

Ruby on Rails, update div on click with link_to_remote

I'm implementing a netflix-like 5 star review ratings. The goal is to have a "rating" div that serves both to enter the rating by clicking on one of the stars, as well to display the current rating. I want to update the "rating" after a users enters a new rating. For now, I can add a rating and create the association to the rated asset,...

jquery waiting for $.each to finish

Hi I have a huge problem that's been bugging me for quite a while, most of the times I have been able to avoid it but now there is no other way. Below is a function that when executed sends a post request for every checked boxes. I need it to wait until the $.each has finished to refresh the page. I have performed tests with location.rel...

Unknown issue (AJAX / GET)

Alright so pretty basic, here are the pieces of code I have, basically it's supposed to updated my table "comments" on the "like" column. My problem is situated in the javascript while trying to submit the result. SPAN which contains a link to submit: <span id="like<?=$i?>"><a href="javascript:void()" onClick="likeComment(<?=$row[comme...

Using JavaScript and XHTML: XMLHttpRequest's open/send do not work if before onreadystatechange.

I don't know if it "works" or not, but I am concluding this because the code posted here, works (except for what's in the for loop (stupid DOM), but that's not the focus) ONLY after two clicks. I'm assuming this is because it is not getting the XML document till it's created, which is at the end of the first click. However, if I were to...

AJAX not properly handling input

I'm creating a WYSIWYG editor that saves the page via AJAX. How it works is you add your elements (text, images, etc) to a DIV via the editor, and when you click "save", it sends that DIV's HTML through AJAX to a script that takes this HTML and writes it into "index.html", so it'll update the front page. My problem: if the DIV has a ba...

Route fails from one page, succeeds from another

I have one bit of javascript that fires off an ajax request, the result of which gets loaded into a popup dialog. This is the same javascript in all cases, but in one case, the route fails. From the new_army_list page: Started POST "/army_lists/preview" for 127.0.0.1 at 2010-10-13 21:42:15 -0400 Processing by ArmyListsController#previ...

Is it possible to send info from a webpage to a server without reloading?

I have found very little on this topic. I'm trying to work out a way to synchronize pages cross-web without having to constantly reload pages to get new information, since the rate at which this would be necessary would cause the page to be outrageously slow. The flow I'm thinking is this: User A alters info displayed on Page A. Page ...

Adding jqGrid Custom Navigation to Top Toolbar

Is it possible to add navigation items to the "top pager" in a jqGrid? And if so, what's the syntax for doing so? I have an HTML snippet on my page that looks like this <table id="mygrid"> </table> <div id="mygrid_pager"></div> And then an jqGrid initialization that looks something like this $('#mygrid').jqGrid({ ..., //full co...

How can I create a Family tree

I want to create a family tree in my website. Can anyone help me? ...

jquery ajax fire 3 time

Please see image and give me some advice. $.ajax({type: 'GET',url: "/_layouts/EmkayCRm/EEagle.ashx?caller=GetCallListFinalData&ID=" + $(Cbo).attr("ID"), timeout: 300000,cache: false,async: true, success: function(data) { var Res = eval("(" + data + ")"); } }); ...

Javascript handling of php readfile octet stream

OK, I've had a good read through the "Related Questions" section and I haven't found this answer. I'm using an ajax request to force a php download. Things are working fine on the PHP end. Let's say I've got a stream of data called DATA. Now, I want to pop up a "Save as..." dialog. The browser has received a string of hex values....

Session timeout response in AJAX

In my application, I'm loading some table using AJAX. But when user's session times out it gives me login page as response that gets loaded in table area. I would like to redirect to login page may be in javascript when session timeout occurs during AJAX call. ...

Cakephp: Saving a Form via Ajax

i have a User Module where users can set their status message (tweet) from the profile page. When some one clicks Share it should go to an action and save the status message. I am not sure how to do this in CakePHP. I would wnna use jQuery. If you can point me to the right document. it would be of great help I am new to Ajax. ...

special case for update panel

i have a button , this button makes a post back for the page(the normal case),, and i have an update panel contains some controls .. when click the button the update panel is not affected by the button,and when adding trigger for this button on the update panel,, the other controls (which are not in the update panel)are n't affected .. ...

Javascript saving xml using Ruby on Rails

Hello, First, what I am trying to do is: I am trying to create a browser application that works on clientside. The basic idea is the user uploads a xml file into javascript. Javascript does calculations on this data and displays results onto the browser. The user is able to interactively edit the result (something like an image/video) ...