ajax

:with clause preventing action from getting executed in link_to_remote call

I'm experiencing problems with the :with clause in the following code. -counter.times do |c| -elem = @tags[c] #{elem.name}#{link_to_remote image_tag('x.png'), :url => {:controller => 'questions', :action => 'remove_tag_from_cart'}, :with => "'tag_remove=' + #{elem}"} If I take out the :with clause, then remove_tag_from_cart gets e...

Can somehow show progress on file upload without using AJAX?

Let's say that I upload a file using a basic multipart post. The server then receives the request and starts to execute the server side code. Can I somehow in that state start to output the response and after some data is sent start to receive the file? Finally when the file is uploaded I output the rest of the response. If this is pos...

Is there a standard way to encode a .NET string into javascript string for use in MS AJAX?

I'm trying to pass the output of a SQL Server exception to the client using the RegisterStartUpScript method of the MS ScriptManager. This works fine for some errors but when the exception contains single quotes the alert fails. I dont want to only escape single quotes though - Is there a standard function i can call to escape any speci...

IE8 (compatibility mode) won't load my Ajax content

Hi all - I am working on a jQuery script on http://www.qxl.dk/ and I can't seem to get IE7 (or more accurately, IE8 in IE7 compatibility mode) to load my content. The sidebar box on the right named "QXL Aktuelt" loads its HTML content from an external file using Ajax load(), then triggers a custom jQuery event ("aktuelt_loaded") that st...

Is it worth learning ASP.Net AJAX

Hi All, I know this is a duplicate kind of question. I have worked with ASP.Net and ASP.Net MVC 1.0. I never really got a chance to get into ASP.Net AJAX. My question is it really worth to invest in learning ASP.Net AJAX 3.5 or 4.0 given the fact, I have hardly used it ? Please let me know your advise. EDIT : - Thanks all for your...

how to get redirect url from ajax handler in c#

i am sending a request to ajaxhandler i want if the user is not logged in then it sends back a redirect url to login page and the page automaticaly redirects to login page after the ajaxrequest response ...

How can I prevent a textbox from taking focus on the postback when I have a calendar extender on it?

Hello, I have repeater, inside this repeater is a user control. In my c# codebehind on my user control I dynamically add a textbox and assign a calendar extender to it. Similar to this. //custom control protected void Page_Load(object o, EventArgs e) { TextBox tb = new TextBox(); tb.ID = "myTextBox"; MaskedEditExtender meeD...

Dynamic path in new.AjaxRequest with Rails

Hello, I was wondering if there's anyway to get a 'dynamic path' into a .js file through Ruby on Rails. For example, I have the following: new Ajax.Request('/tokens/destroy/' + GRID_ID, {asynchronous:true, evalScripts:true, onComplete:function(request){load('26', 'table1', request.responseText)}, parameters:'token=' + dsrc.id + '&authe...

Why does calling abort() on ajax request cause error in ASP.Net MVC (IE8)

I use jquery to post to an MVC controller action that returns a table of information. The user of the page triggers this by clicking on various links. In the event the user decides to click a bunch of these links in quick succession I wanted to cancel any previous ajax request that may not have finished. I've found that when I do this...

Ajax to read file created by CGI

Any one here used C based CGI?? I have this server side code : while (cgiFormFileRead(file, b, sizeof(b), &got_count) == cgiFormSuccess) { fwrite(b,sizeof(char),got_count,output); i++; if(i == inc && j<=100) { fprintf(fptr, "%d" ,j); fseek(fptr, 0, ...

Should I go for Arrays or Objects in PHP in a CouchDB/Ajax app?

I find myself converting between array and object all the time in PHP application that uses couchDB and Ajax. Of course I am also converting objects to JSON and back (for sometimes couchdb but mostly Ajax), but this is not so much disturbing my workflow. At the present I have php objects that are returned by the CouchDB modules I use an...

Jquery Ajax + PHP

I am having problems with jQuery Ajax and PHP I have my php file set up to echo the data I am gathering from a mysql database. I have verified that the database is returning something and that the string at the end of the function actually contains data. What is happening though, is that it looks like the php echo is happening before ...

File upload progress bar

Anyone who has developed file upload progress bar with following: Ajax Javascript HTML C based CGI I am stuck at one point. I am not able to read each updated progress bar value from CGI script. /*****************CLIENT SIDE CODE*************************/ var intervalID; var percentage; var request; var tempvar=0; var progress; fun...

How to Retrieve Data From Web Page Programatically?

There is a website which shows history of lottery numbers. I want to retrieve numbers from the page, by using C# Windows or Web program(ASP.NET). There is a problem that, after selecting the week which you want numbers for from dropdownlist, page does not post. Numbers are retrieved by Ajax. How can I get numbers for all of the weeks b...

AJAX works fine in firefox, but malfunctions in Mozilla Prism 0.9

I have the following ajax fucntion: function ajax(value, url, urlVarname, displayContainers_id){ if(value == ''){ document.getElementById(displayContainers_id).innerHTML=''; } /* THIS IS LINE 12*/ xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange=function() { if(xmlhttp.readyState == 4 &&...

Searching Loading Gif

Hello, For my application I need a loading gif animation. I searched around the web but could not find to my need. Requirements are below: 64x64 px transparent background throbber like GPL Where can I find such a Ajax style loading Gif? Thanks ...

POST XML to server, receive PDF

Similar to this question, we are developing a Web app where the client clicks a button to receive a PDF from the server. Right now we're using the .ajax() method with jQuery to POST the data the backend needs to generate the PDF (we're sending XML) when the button is pressed, and then the backend is generating the PDF entirely in-memory ...

Major JQuery bug on IE not reproducible - What can i do in this situation to solve this bug?

I am hoping to get some help on this issue. Some users on IE have been reporting this javascript issue, but I have been unable to re-produce it. In essence, for some class of windows IE users, the game doesn't work (or $.ajax() is not working). What I know: I swapped out an ajax call (ajax_init_trainer) and used a standard link w...

Best way to structure AJAX for a Zend Framework application

Sorry, but there's a lot of outdated and just plain bad information for Zend Framework, since it has changed so much over the years and is so flexible. I thought of having an AJAX module service layer, with controllers and actions that interact with my model. Easy, but not very extensible and would violate DRY. If I change the logisti...

migrating from Prototype to jQuery in Rails, having trouble with duplicate get request

I'm in the process of migrating from Prototype to jQuery and moving all JS outside of the view files. All is going fairly well with one exception. Here's what I'm trying to do, and the problem I'm having. I have a diary where users can update records in-line in the page like so: user clicks 'edit' link to edit an entry in the diary ...