ajax

ASP.NET Generic HTTP Handler (.ashx) supporting JSONP

Can someone show an example of an HTTP Handler that returns JSON and supports cross domain calls. I am using jQuery's getJSON() that sends a request to an .ashx file on my web server. I understand that I need to add ?callback=? to my url in the getJSON() url, but I'm not sure what needs to be done on the server in my ashx file? ...

Bind Data to Repeater using Ajax

Hi, I want to Bind data to a Repeater on click of a particular Button. I can do an ajax request via jQuery and call the method to bind the data, but on the page nothing is displayed. This is the method I use to bind the data to the Repeater: public void BindJobs() { if (RptClientDetails.Items.Count != 0) return; RptClientDeta...

Is there an AJAX function that can just GET a rails partial ?

My controller is shared by links from a search result page that needs a layout, and from the profile page itself that does not need a layout. What I would like to accomplish is a single controller method show that is both capable of drawing the partial by AJAX from the profile page, and draw the partial and layout from the search results...

Html.RenderAction using AJAX

Is it possible to use HTMl.RenderAction using ajax to provide the parameter? I have a controller action like this [ChildActionOnly] Public ActionResult EmployeeData(string id) { Employee employee = new Employee(); //do work to get data Return PartialView(employee); } The partial view is just a small table with some empl...

issue with css inherit and Ajax

There is a table alt text that uses CSS (by using inherit in CSS) to format its layout. As you can see there is a drop down on top of the window that allows us select names, and based on the selection, the table would be populated. This action has been handled by an Ajax call, so we only refresh the table and not the rest of the page. H...

ASP.Net / C# - Ajax postback pager problem

Hi! I have a 'shop' page, where all the items in the shop is listed. I have a sortingfunction, to decide how many results pr. page I want to see. I also have a pager. The pager is built with two buttons (a Previous- and Next-pagebutton), and a textbox which shows the pagenumber. The pager is on both the top, and bottom of the page. Wh...

Using AJAX to load an MVC user control inside of a jquery tab inside of a jquery dialog (C# Inside)

I have an index page for listing products. From this page I would like to be able to open a dialog with the following tabs. Edit/Create Product, Product Images, and a tab for Brands. The brands tab isn't specific to the product being edited/created, and doesn't require being passed an ID. I have everything broken up into the following pa...

Accessing binary data from Javascript, Ajax, IE: can responseBody be read from Javascript (not VB)?

First of all, I am aware of this question: http://stackoverflow.com/questions/1095102/how-do-i-load-binary-image-data-using-javascript-and-xmlhttprequest and specifically best answer therein, http://emilsblog.lerch.org/2009/07/javascript-hacks-using-xhr-to-load.html. So accessing binary data from Javascript using Firefox (and later ...

How do I get the length of a Perl Unicode string input via Ajax or CGI?

Okay, this should be really simple, but I have searched all over for the answer and also read the following thread: http://stackoverflow.com/questions/1326539/finding-the-length-of-a-unicode-string-in-perl It does not help me. I know how to get Perl to treat a string constant as UTF-8 and return the right number of chars (instead of byt...

form radio box ajax value

Hey! I programmed a form which dynamically calculates the price. You can select between 2 packages. <input type="radio" id="p1" onclick="doWork();" name="package"/> <input type="radio" id="p2" onclick="doWork();" name="package"/> In Ajax I send the value to a php file. function doWork(){ httpObject = getHTTPObject(); if (...

Reloading modernizr after ajax

Hello, I have part of a page being dynamically refreshed via the jQuery load() method, but its not looking so hot in IE. Short of rewriting the mark-up to suite ie, I would like to reload modernizr after the ajax and have it re-work its magic to the newly inserted content. Is this possible? hopefully via the load() callback somehow? upd...

Activate jquery ui widgets within dynamically loaded form

What is the best practice of activating jquery ui widgets for html loaded and inserted into the document by ajax? I am an advocate of unobtrusive javascript and strongly believe that all functionality accessed by javascript should be also accessible without it. So in the ideal case, each form which opens in a popup, should also have its...

How to start JSON?

Hi,everyone, I want to ask a question about the JSON. I am the green of the Ajax and I want to learn some JSON. Can anyone provide some links or reference to me? Thank you very much. ...

Sending two Ajax requests to two different PHP scripts from single javascript function

Is it possible to send Ajax requests to two or more Php scripts simultaneously? I know that this can be achieved serially (getting response from 1 and then getting response from the other) but I am wondering is it possible simultaneously. Please assist me with the following code: function calShowUpload(){ if (http.readyState == 4) {...

Why tabcontainer(ajax control toolkit) and tab panel is not showing in chrome but working fine in IE8 anf FF3.6.9?

I am using a tab container and inside that different tab panel <cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="2" ForeColor="Blue" AutoPostBack="true" Width="100%" EnableViewState="True" OnActiveTabChanged="TabContainer1_Click"> <cc1:TabPanel ID="view1" runat="Server" HeaderT...

PHP ajax chat without database at backend

Hello everyone Does anyone know where messages accesses without using database on php-ajax chat? example can be found on www.phpfreechat.net/ ...

Zend form file upload problem with jquery ajax form plugin

with latest zend framework i can't upload file with ajax. in my form there are 3 field (title, description , image) . I'm using zend form. For ajax submit i'm using jquery form plugin (http://jquery.malsup.com/form/) And here is the code for ajax submit. <script type="text/javascript"> // wait for the DOM to be loaded ...

calling a function in javascript after a period of time has passed

I'm trying to write a function that will auto suggest what the user means when they type into an input field. Right now I have all of the auto suggest code complete but in my javascript I can't get to the first if in toggleGenusInput no matter what I do (this first if queries the database through php and gets the suggestions). Does anyo...

onclick validate file type, if the file is good send some data to the server

Hi, I have a form with too many fields. What I am trying to do, is first do some validation using jquery; which is working fine so far. I have an event handler "onclik" which validate the file type that uploaded by the users, and if the file is not image shows a message to the user. If the file is good it should send some data to the ser...

How do I manage ajax uploads using SWF Upload for concurrent users?

Hi guys, I'm building a simple email functionality in my web application and would like to set it up to be able to send in attachments as well. The thing is that I want to set up the ability to upload files i.e attachemnts asynchronously. I'd like to use SWFUpload for this however 'ajax' uploaders upload the file to a location on the ser...