ajax

How do I individually paginate tabbed page

I am designing a blogging site but the pagination shows up in every tab. How do I individually paginate? This is the ajax code I am using with class name pagination. ...

Is there a way (In PHP) of detecting if the script was called by jQuery load or not?

I'd like a script that could detect if called by jquery If not, it'd display the page+layout, if not, it'd just so the content (but that is irrelevant) But yeah, a way of detecting if it was called by jquery load - ajax - or directly requested. Cheers! ...

Finding/Handling stalled PHP scripts

I use Ajax to kick off a PHP script that can take a few hours to run. It's done asynchronously so the PHP script will complete even if the browser is closed. I need to handle any of these PHP scripts that have stalled/hung for whatever reason. What is the best way to go about this? Is there a way to get a process id for the PHP scrip...

Problem with IE8 using AJAX

Hello, Can anyone help me with this IE8 problem, my app is work fine in FF but Ajax Functionality is not working in IE8 function createXMLHttpRequest() { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); } if (window.ActiveXObject) { // code for IE6, IE5 ...

browser navigate to link before $.ajax request can finish

upon clicking an anchor link, i send an $.ajax request to the server. however, before it can finish, the browser navigates to the href location. originally i have placed e.preventDefault on all anchor, and upon success: doing a window.location to the href. this works very well, but for anchor's which dont have href attribute, instead ...

I would really like to use PHP and MySQL persistent connections, but how?

Apache/PHP/MySQL persistent connections have such a bad reputation because Apache handles each request as a child php process, each having 1 persistent connection. When visitors scale, MySQL reachs max connections limit from all the apache/php child processes, each with 1 persistent connection. There's also the issues of temporary tables...

jQuery: Made json request, process it in callback, access it outside the callback function?

$("select[name=field[]]").live("change", function() { $.getJSON("/json.php",{id: $(this).val(), ajax: 'true'}, function(j){ options = ''; for (var i = 0; i < j.length; i++) { options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; } }); ...

how to delay default action?

in jquery, i need to delay the default behavior of anchors, so that in the meantime, ajax post request can complete itself. preventDefault or returning false in .click event wont do, as I still need to navigate to those pages. window.location = href obviously fails because some anchors do not have href attribute instead uses javascript....

Data through jquery's ajax not being sent.

Hello. I've got a webpage which needs to load some data from a database. In order to do that, I'm using jquery's $.post function, which loads a file called photoList.php, as follows: *(photoList.php)* <?php include 'mysqlConnect.php'; $query = mysql_query("SELECT name FROM images"); $photoList = Array(); while ($row = mysql_fetch_asso...

jQuery/Ajax/Json - Display respective values on submit for inputs with same class name

What I want to do is: When each button is pressed, show it's respective value. Right now the value returned is always "1". The json.php file will eventually be used to update records in a database. Any help would be greatly appreciated. Thanks! Here's the json.php file: <?php if(isset($_POST['hidden'])) { $data['value'] = $...

How can caches_action be configured to work for multiple formats?

I have a rails action which responds to requests in various formats including AJAX requests, for example: def index # do stuff respond_to do |format| format.html do # index.html.erb end format.js do render :update do |page| page.replace_html 'userlist', :partial => "userlist", :obje...

jQuery click event behaves differently with live function in Firefox

Using the event click with live function leads to strange behavior when using Firefox*. With live in Firefox, click is triggered when right-clicking also! The same does not happen in Internet Explorer 7 neither in Google Chrome. Example: Without live, go to demo and try right clicking the paragraphs. A dialog menu should appear. With...

Get size of file requested via ajax

Here's what I'm hoping to do: I want to send an ajax request to a file (preferably with jQuery), and once the file has been loaded, determine the size of the requested file. After a bit of googling, it's clear that I don't even have a good idea of the right question to ask to figure this out. Any help would be greatly appreciated. ...

does jQuery have an effect like this? This is using prototype

http://blog.posterous.com/ Click on the comments link. Notice how the comments are loaded, kind of sliding down. ALso when you click on 'hide'. ...

Using JSON Data to Populate a Google Map with Database Objects

I'm revising this question after reading the resources mentioned in the original answers and working through implementing it. I'm using the google maps api to integrate a map into my Rails site. I have a markets model with the following columns: ID, name, address, lat, lng. On my markets/index view, I want to populate a map with a...

how to make secure dynamic update via ajax timer

hi guys, currently i am in browser game project, quite similar to mafia wars or restaurant city(in facebook) we are using php jquery and CI to build this game my question is how to make secure dynamic update via ajax(e.g in mafia wars, it is stamina that if you spent some, the game will show you "more in 04:00" and if you wait 4 minut...

looking for a rails example using ajax, simpler the better

I am trying to locate an decent example of ajax json interaction with Rails. I have a Rails app that uses standard forms and wish to improve it with some ajax, but I have not found a good example to inform me. ...

Make MVC application safe for ajax and other attacks

I have a complete unsafe mvc application. And now I started to think about security. Cause I use a couple of ajax I will close this securityhole with AntiForgeryToken is this a good way to stop Injection attacks?. Next I thought about authentication and how i could manage my users. Than I decided to use the users of my Domain. But ho...

Ajax ActionLink OnSuccess call javascript function with parameters, Error: Object required

Hi all Using Ajax.ActionLink's OnSuccess-Event brings me some trouble. As asked here the function cannot be called directly. I tried all the suggestions I found, I get a message "Object required". The javascript-function expects an event, which is nothing/null when I pass it the correct way. Code snippets Before: OnSuccess = "ListA...

Getting the time in seconds in which the session will expire

I am building a web application that has a top thin frame which should show the time in seconds in which the servlet session will timeout. The problem is that a AJAX call to a servlet which returns the last access time, and the inactiveInterval itself updates the session. So is there a way I can get information about the session via a ...