ajax

A nonce for each function or one for all AJAX calls?

I'm using nonces as WordPress uses them. It's an extra security measure, a hash that is being sent to the server that changes within ever few hours. If that hash is not there, the request is invalidated. The page I am working on has many AJAX calls (about 20 or so). Right now, I have a difference unique nonce for each one. Is that nece...

AJAX Submit via Post entire Form

I am trying to simply post an entire form w/o the need to create the url like you would have to in a get call. All of the tutorials I have seen for this for some reason create a parameter URL and send it via the send ability. I want to be able to send a form via the form id or form name, is this possible? The reason is because I will ha...

AJAX responseText not getting anything

I wrote this simple AJAX script: var request; function createRequest(){ request = null; try{ request = new XMLHttpRequest(); }catch(failed){ request = null; } if(request==null){ alert("Incompatible Browser"); } } function getProd(form){ createRequest(); var w = form.list.selectedIndex; var cat = form....

Create a 'send to Delicious' bookmarklet with custom tag

Hi, I've created a javascript bookmarklet that gets the current page's title and URL, using the following code: //Check to see if jQuery is already loaded if (typeof jQuery == 'undefined') { var jQ = document.createElement('script'); jQ.type = 'text/javascript'; jQ.onload=runthis; jQ.src = 'http://ajax.googleapis.com/aja...

can Google AJAX Feed API support geo-rss or geo-atom .

i want to load geo-rss using google ajax api , but can it load geo-rss ? thanks ...

mvc 2: filtering online vs offline users

I understand that I could show online users using ajax. For example, I could detect and display if the user has been online or offline for last 5 minutes or 15 minutes etc. How do I filter the users by online vs offline? Or How do I filter the users by offline since 5 minutes, 10 minutes, 15 minutes etc etc.?? Since this logic will b...

Only Perform Action Once in jQuery

I am using jQuery UI and trying to disable all text boxes in a data group, but only do so once per loading of the tabs. Here is what I have so far: $(function () { $("#tabs").tabs({ cache: true, load: function (event, ui) { $(".data-group").one('load', function () { $(...

Ajax & PHP - can't find session cookie?

hey guys, i'm having a little problem. I'm working on a wordpress template which lists all files on my ftp. Therefore i ask for the the password and pass it straight along to the ftp_connect. So the structure looks like this. I'm asking for the password, and if entered (and send) i'll include a file called ftp_include.php which lists ...

IE div, updatetargetid not refreshing on subsequent requests

I am facing an issue while showing the partial view in div with updatetargetid property of Ajax.ActionLink. This is my controller- [HandleError] public class HomeController : Controller { static NumberViewModel model = new NumberViewModel(); public ActionResult Index() { model.IsDivisibl...

Ajax validation

how to use Ajax validation on-submit event using prototype in rails application ...

Unable to change session variable through AJAX in IE

I'm getting some weird behavior from IE when trying to change a session variable on the server using AJAX. It works fine in FF, Chrome, Safari, and all the others I've tested but not in IE. I'm maintaining a list of variables (integers) in a session variable for anonymous users so I can keep their data when/if they register on the site....

javascript and ajax issue.

i want to show a folder. After that clicking on this folder might open some subfolder those are containing the images and at last when one will click on each folder then he/she should see some images which will sliding. How can do that? any link or suggestion... ...

jquery tooltip hover help

I have a tooltip pulling in some Ajax content and want the tooltip to stay visible when the user hovers over the tooltip not just the original link. How would I achieve this extending the following code (function($){ $.fn.tooltip = function(options){ var defaults = { cssClass: "", //CSS class or classes to style the tooltip ...

Problem in submiting form using jquery

<script src="jquery-validate/lib/jquery.js" type="text/javascript"></script> <script src="jquery-validate/jquery.validate.js" type="text/javascript"></script> <script type="text/javascript"> jQuery.validator.addMethod("steam_id", function(value, element) { return this.optional(element) || /^STEAM_0:(0|1):[0-9]{1}[0-9]{0,8}$/.test(valu...

AJAX POST and PHP

Hi, I have a AJAX script which sends a POST request to PHP with some values. When I try to retrieve the values in PHP, am not able to get anything. The AJAX script is xmlhttp.open("POST","handle_data.php",true); xmlhttp.setRequestHeader("Content-type","text/plain"); var cmdStr="cmd1=Commanda&cmd2=Command2"; xmlhttp.send(cmdStr); alert...

Should i go with Asp.net Ajax 4.0 client templating?

I have been investing sometime in client templating in Ajax 4.0. However now i seem to have some doubt if the choice is right. I hear that Microsoft is investing heavily in jquery templating jquery.tmpl plugin and in general for client side Ajax JQuery seem to be what is recommended. However jquery.tmpl is in early stages for me to consi...

Ajax4jsf File Upload

I want to upload a file with AJAX in a JSF application. The idea is that as soon as the user selects the file, it is uploaded, and a preview is shown. Currently I am using t:inputFileUpload and have the code to insert the image in a database and show the preview. I tried a4j:support but it did not work. Many thanks, Panayiotis ...

Passing a variable through AJAX and Rails

I've made an array in my controller with the items that I would like to rotate through. The initial set is used as a partial collection and looped through. render :partial => "partial", :collection => @array[1..4] I also have a link_to_remote link on the page that makes a POST request to the controller to change the range on the colle...

ASP.NET MVC 2 server-side validation for ajax form

Hi all! I've faced the following problem. I'm developing a form for the site and this form should have validation. I wanna to use native ASP.NET MVC 2 validation functionality but get stubborn with it. I have a form that is loaded via $.get and displayed using jQuery UI modal dialog. All examples I found explains how to use MVC validati...

how to change the ajax tab index in java script asp.net

Hi, Can any one tell me how to navigate thro the ajax tabs using java script in asp.net? Thanks in Advance ...