ajax

Positioning AJAX ModalPopupExtender in the center of the screen problem

I have problem with positioning ModalPopupExtender in the center of the screen when it's PopupDragHandleControlID property is set (without this property it works fine ). ModalPopupExtender is not positioned in the center of the screen. I thinks what causes the problem is the page's CSS layout cause when i disable it, popup positioned in...

Why Javascript calling to Page WebMethod results in "500: Unknown web method"?

I have a page with this method in CreateTicket.aspx.cs: [WebMethod()] public static string Categories() { var business = new CategoryBusiness(); var categories = business.ListRootCategories(); return categories.Json(); } And the javascript/jquery code on the page (same page, .aspx): function LoadRootCategories() { Pa...

Jquery , Ajax and ASP.NET webmethods

Using query ajax to call a webmethod in an ASP.NET page works well if the HTTP request is a POST. If a HTTP GET request is used the Page_Load event runs instead of the webmethod. Any ideas? Here is the Ajax $.ajax({ type: "GET", url: "http://local.proleaguesports.pagefad.com/AjaxTesting.aspx/receivermethod", dat...

How to update DIV with .replace upon form submission

Hello. Could some please advise how to include a php file to update content in a div upon successful Ajax form submit? This works: jQuery(form).ajaxSubmit({ success: function() { $('#ajaxRenew').load('script.php'); } }); but my script.php requires headers, etc, from the page it gets included into (it works ok as "Include" normal...

JQuery Ajax Post results in 500 Internal Server Error

I am trying to perform this AJAX post but for some reason I am getting a server 500 error. I can see it hit break points in the controller. So the problem seems to be on the callback. Anyone? Thanks! $.ajax({ type: "POST", url: "InlineNotes/Note.ashx?id=" + noteid, data: "{}", dataType: "json", success: function(data) ...

google.load - and message "google is not defined"

What do I need to include to do a google.load() statement? I'm getting error "google is not defined". Based on this page, http://code.google.com/apis/ajax/documentation/#DetailedDocumentation I thought I should add this: <script type="text/javascript" src="http://www.google.com/jsapi?key=ABCDEFG"&gt; </script> But when I d...

html file upload as part of another form

Idealy I would like to have the following: <form1 ...> ... <form2 ...> //This form uploads a file using AJAX and writes the content into a text field below. </form2> <input type="text"/> </form1> Firefox handles this but IE likes to follow the rules of W3C this time and it doesn't really work. So now...

In jQuery, how to load ajax content after a specified element

I have the following HTML: <div id="mydiv"> </div> I would like to load content using jQuery so it appears after my DIV. I've tried this: $("#mydiv").load("/path/to/content.html"); However, this ends up with this result: <div id="mydiv"> <p>content from file</p> </div> How do I get this result? <div id="mydiv"> </div> <p>conte...

how to schedule ajax calls every N seconds?

If I want a whole page to reload every N seconds, I would put something like this in the HTML: meta http-equiv="refresh" content="5" Is there a standard practice for doing the same kind of thing for AJAX calls? I want schedule an AJAX call to go off every 10 seconds say, in order to update parts of the page, without refreshing the whol...

How to increase the performance of ajax enabled web site?

Hi to All, I had 1/2 web application prepared. I had seen that the performance getting very slow when using the ajax control compare with using javascript but only when that is deployed on the server. Why is this problem problem arriving when ajax controls used in application, performance sleeps & not opens the pages quickly. What is...

How to post newly added contents of listbox to Ajax based server method.

I am using the AJAX.DLL to call the server methods. Now I need to send the newly added contents of listbox to the server method. So, what should I do now? ...

Getting values from external input fields generated by jQuery

I will try to explain the situation as it is a little bit more complicated. I have created a multiple picture upload form. It works like this: In the form there are 2 submit buttons. 1 normal HTML submit button and another one is generated by jQuery. It is a "Browse" button which allows you to browse pictures on your HDD and add them ...

is it possible to change page before ajax?

for example: user submit a comment , I add the comment in the page by javascript , then do the ajax. if ajax post failed ,tell user that something wrong happend. in this way , it can improve user experience . and the probability of ajax failed is not low. but I didn't seen which site is using this technology , so is this method possibl...

How to dynamically change the height of a div

How do I dynamically change the height of a div. Why does this not work: var priceBarElement = $("priceBar"); priceBarElement.style.height = request.responseText+"px"; Which I hope to use to change the priceBar div which is given by this line further down. <div id="priceBar" style="width:28px;margin-top:20px;background:#F00"></di...

Provide users with a search feature filtering a dropdownlist

Hi I'm developing an ASP.NET form for data-entry. Users have to select a client from a dropdownlist that is filled with about 1000 clients. Now the client list is growing and the users have requested that I add a lookup feature: they'd like to type part of the name and filter the dropdownlist with clients whose name match. So if they ...

How can I show a hidden DIV if a AJAX JSON response shows the proper data?

I am working on a AJAX/jquery notification script. Currently it retunrs a whole fhtml formatted page every 10 seconds in the AJAX response. The page it is returning is a PHP page which only shows items that should be shown (only items that have something NEW show up, like a new mail message or a new comment etc..) I am wanting to cha...

jQuery AJAX call to ASP.NET WebMethod errors constantly

I have a really simple AJAX method inside my Default.aspx.cs and it looks like this: public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } [WebMethod] public static string GetDate() { return DateTime.Now.ToString(); } } And the Default.aspx ...

Is it possible to render a different exception page if the request is an XmlHttpRequest?

If there's an exception in a Rails application, one gets an error page with the call stack, request parameters and a code excerpt. Is it possible to create a different output if the request is an XHR request? Is it possible to re-define the exception output in general? (I assume that would automatically answer the first question) ...

DRI in jquery? - n00b question

can someone tell me how to make and call my own jquery functions? (im an absolute front end noob) take this example code :- <script> $(document).ready(function(){ $.getJSON("http://127.0.0.1:8000/json/storylist/", function(data){ $.each(data.stories, function(i,item){ $row = item.title; $('#sto...

JavaScript Auto suggest to update multiple fields

I have a simple autocomplete field that spits out a bunch of suggested words and puts it in the suggest field. Is there an auto suggest code that can enter the selected text but also auto fill a range of other fields instead of the selected field? For example, searching through a contacts list you type their name or address and it sugge...