ajax

IE7 vs. A Python Pickle Object

I have an issue with IE7 not wanting to pass a pickled object through a ajax call using HTMLTMPL. It works in IE8 (and in compatibility mode) as well as in Firefox. I have pickled an object using the command: newhash['pickled'] = pickle.dumps(hash) Because JS didn't like the newlines, i regex them out using: newhash['pickled'] = re...

POST request reaches server but empty

I'm setting up an API for a simple webservice and stumbled upon a problem. I use Ruby on Rails for the back end and a JQuery ajax call to send a POST to create an instance of a model. The JavaScript code is: $.ajax({ type: "POST", url: "http://localhost:3000/api/v1/person/add", data: "name=John&location=Boston", success: funct...

trigger reload grid in the gridComplete.

Hi everybody, I try to reload my grid with the search parameters I got when I went to another page and I come back to the grid, so for the beginning, I tried with hard-coded parameters. When I try this in a click function, it goes very well: <a href="javascript:void(0)" id="r">reload</a> jQuery('#list').click(function(){ $('#list').jq...

Unable to perform any PHP operations in an Ajax application.

My Ajax application was working fine, until I implemented an if statement in the PHP script... then like a contagious disease it seems that if I do anything to the data in PHP it returns nothing back to the Javascript layer. All I can do is echo the data back... For instance the query string I'm sending to the PHP reads... index.back3...

How can I use jQuery Ajax and PageMethods with instance variables?

One reason we currently use UpdatePanels for doing our AJAX is because our BL and DA layers pass around the Page.User.Identity for authentication. Is there a way to access this? ...

MVC, WCF ASP.NET 4.0 & JQUERY

Hello, I've spent the past few days getting frustrated with WCF, so I've decided to post for help on here because.. well.. I don't have a clue where to start!.. any help would be appreciated! Firstly: When creating a WCF Service in .Net 4.0, which template should I use if I want to be able to create a service that will accept data from...

Retrieve plain text with jquery ajax and convert to JSON

Update: the following works fine in IE8, but data comes back null in firefox: $.getJSON('myUrl/solr/select/?q=citystate%3ASea*&version=2.2&start=0&rows=3&indent=on&wt=json&fl=citystate', function(data) { alert(data.response.docs[0].citystate); }); I have a jetty server that generates json data as plain text - here are what the heade...

Pressing Escape under Firefox kills my Ajax requests. I'd like to prevent this.

Dear Stackers, I'm developing a web application which requires long-running Ajax requests. Unfortunately, under Firefox, pressing Escape during a request has the drawback of killing the request and any information it was holding. This is rather annoying, as this can lead to all sorts of nasty complications if this happens at the wrong t...

Why isn't Firefox submitting my form twice?

HTML/JS Here: http://pastebin.com/JrtfeAtw PHP Here: http://pastebin.com/EcRHCwmY Based on Ajax F1's tutorial here: www.ajaxf1.com/tutorial/ajax-file-upload-tutorial.html Anyway, my problem. In Chrome, this works fine. However, in Firefox, it will upload the first file no problem, and begin uploading the second one. I've traced it in Fi...

Poor Man's Load Balancing

I have a mysql database with several tables. I have an input that makes ajax calls for every character. Is there a way to load balance by distributing to other domains etc? Estimated statistics: ~1000-2000 hits a day. Average site time per user ~30-60 secs. ...

Detecting the clicked links after ajax load in Chrome using $("a:focus")

I have a page which has a list item, and each item has a delete button. Clicking the delete button loads the child page (delete.asp?id=123) in a hidden div. delete.asp has a javascript alert (on document ready) which successfully fires when the button is clicked. It also has $("a:focus").hide(); which removes clicked link. I can't seem...

Conflict with ajax while using with Jquery

hi i am using jquery tab in my page. but while using update pannel both tab will appear in same page. this occures after a post back.. is any problem is there for using jquery and update pannel together? How can i overcome this? ...

Strip slashes that jQuery adds when returning HTML via ajax?

I am using the jQuery ajax method to get data from the database and return the data via a json object. However one of the values in this json object is an HTML string. I am basically doing exactly what is seen here except I need to know how I can remove the slashes that jQuery is adding to the HTML string. Any ideas? Example json.HTML ...

Creating interactive ajax javascript widgets in ruby / rails

Looking to create interactive javascript widget using ruby-on-rails that can be placed on any website. I am able to create a basic widget. Its fairly straightforward (eg. using document.write) This works fine for taking data from my server and putting it into the widget but its very static. But how do I create something more dynamic ...

Javascript vs HTML (Which takes more time to load)

What would i be better off having a lengthier Javascript or a lengthier HTML. Few things- 1. I don't care about the SEO ratings. 2. I do care about the speed of the site. 3. I do care about the functionality of the web site. Basically my question for the core coders- Whats better - <div> Blah blah blah blah </div> or document.getEl...

Copying file uploaded vai PHP's HTTP Get in PHP 4

Hello, I have been working on adding functionality to a site originally written in PHP 4.4.9. It's not in their budget to port the site to PHP5, so don't even suggest it. (Although it needs it badly). The problem I am facing is how to copy binary data from a GET request to a file location on the server. The code that is currently writte...

How do I pass an onclick argument to a CFC to update the database through AJAX?

New to Ajax. Just trying to do a simple ajax/cfc vote yes/no app. Can’t get it to work What I am trying to accomplish is a simple Vote “Yes or No “ app where it shows the number of votes casted on each link (great idea 882    this sucks 163). After the visitor votes it displays the message (“you voted Yes 883” or “you voted No 164”) ...

Inserting html with jquery doesn't work

I'm building a simple shoutbox. Here's the html : <div id="shoutbox"> <form method="post" id="form" class="shoutbox-form"> <table> <tr> <td><label>User</label></td> <td><input class="text user" id="nick" type="text" MAXLENGTH="25" /></td> </tr> <tr> ...

A potentially dangerous Request.QueryString value was detected from the client when sending html markup from jquery post call to asp.net page

I m making an ajax call using jQuery to an asp.net page which acts as my ajax server page to save the data which i am sending to it in the querystring. in the asp.net page when i am trying to read the querystring i am getting this error A potentially dangerous Request.QueryString value was detected from the client... I have set the V...

AJax JSON Call error when trying to access the properties of class

I am making a JSON call to web method which is defined in code behind. The web method returns a class object.The class returns 3 properties one of type list and 2 integers. I am accessing these in the following manner: success: function(result) { alert(result); alert(result.LookCount); ...