ajax

How to monitor all XmlHttpRequest POSTs from Javascript on IE6?

I am building an ASP.NET site including third party controls (e.g. ComponentOne WebGrids) which do partial page updates. I want to monitor these updates, in order to reset a client-side timer, mirroring the server-side session timer. The aim is to provide an online-bank style dialog - "Your session is about to timeout.. click this button...

Submiting a form from ajax outside the page (php)

hey i use jquery to insert a form into a div, the form is in a php file. function show(id){ var content = $("#layer1_content"); $("#layer1").show(); var targetUrl = "mouse.php?cat="+id; content.load(targetUrl); } so everything works, but when i submit it goes too that php page, if i call the same form within the same php ...

Problem running my project in IE 6.0 and 7.0

I am using AJAX for my project. And the entire porject is working fine on all browsers except for internet explorer 6.0 and 7.0 too It is working fine on IE 8.0. Anyone has a suggestion, what i should be doing?? Regards Zeeshan ...

Ajax with PHP and XML, getElementsByTagName IE issue

I'm having an issue with getElementsByTagName in IE (7 and 8). I have an address lookup that returns each suggested address (as a string of XML) into a PHP session variable, which is then accessed using an AJAX function that returns the requested session variable. Each session variable is set in step 1 of the ajax address lookup (I ha...

Back button functionality to webpage with form and search result + Ajax (ASP.NET)

I have an asp.net form used for search. The search result is showing on the same page using Ajax. If I navigate to another page and come back, I get the populated form but the search result is empty. What's the best way to go back to the page and have the result populated. Or how to force the page to post back to repopulate the page wi...

Yet Another world city auto complete field question

Hi, I know that this question has maybe been asked several times but I have search several days without getting any satisfying answer. Some sites, like eventful.com, etc. have a autosuggest city field with cities from around the world (even small cities in small countries from Tunisia). I'm wondering how they achieve it. I've a text l...

How to return AJAX response Text?

I use prototype to do my AJAX development, and I use the code like this: somefunction: function(){ var result = ""; myAjax = new Ajax.Request(postUrl, { method: 'post', postBody: postData, contentType: 'application/x-www-form-urlencoded', onComplete: function(transport){ if (200 == tra...

Jquery AJAX Load problem

I'm trying to load all my website pages using jQuery .load method so, thats how my website looks: <script type="text/javascript"> $(function() { $('.link').bind('click', function(e) { var page = $(this).attr('href'); $('#site').addClass('loading'); $('#content').load(page, function (){ ...

ASP.Net Ajax Photo Upload

I have a modal that I implemented using the jQuery Colorbox and the modal works great for everything. However I have to have the functionality of an 'Update Your Picture' Member picture area and I wanted to acheive this through AJAX. Apparently this is possible but not really through AJAX. I have tried to implement the AJAX Upload functi...

Can't get UpdatePanel to refresh on GridView paging.

I have a GridView in an UpdatePanel (ASP.Net 2.0) . I have this code for the PageIndexChanging method of the grid view: protected void grdProductSearch_PageIndexChanging(object sender, GridViewPageEventArgs e) { grdProductSearch.PageIndex = e.NewPageIndex; grdProductSearch.DataBind(); } For the Updat...

How to return the correct content-type for JSON in CakePHP?

Hi, I'm trying to set the content-type header for a JSON response accessed with an AJAX GET request. I've followed tutorials on blogs and the bakery but I always receive 'text/html' back from CakePHP. How do I set the content-type header correctly? Here's my code at the moment: http://bin.cakephp.org/view/668011600 Any help would be ap...

LinkButton (inside a Panel, but outside of UpdatePanel) OnClick event not causing parent page PostBack?

Using VS2005, ASP.Net 2.0, AjaxControlToolKit I have a LinkButton in a Panel that contains an UpdatePanel with a GridView. The link button is outside the UpdatePanel. The OnClick event has this code: protected void lnkOk_Click(object sender, EventArgs e) { foreach (GridViewRow row in grdProductSearch.Rows) { CheckBox c...

can I update a label using ajax, instead of a textbox?

Hi, I'm using ajax to update a textbox once the value in a drop down box has been selected. However, i only update/put text in it if certain conditions are met, so it looks rubbish when there is no message. I was thinking that having a label there would be much better, but is this possible? Can i have an empty label and just update the ...

Indexing an array every cycle (in seconds)

I have to put datas every 10 seconds in an array. Is it silly to index this array with modified timestamps $a[timestamp] = 54; $a[timestamp+10] = 34; or in Javascript with the setInterval() and passing via Ajax the index (very crappy to me) ? or have I a best option ? Further details : I have to link the real-time with entries in...

IE6+, how to change User-Agent for Ajax requests too?

Hi, all! I want to make own browser application with own value of User-Agent. Browser based on CHtmlView. MFC. But exist strange problem with User-Agent from Ajax requests... I did: User-Agent value is used as argument to Navigate(). A Navigate() requests use right User-Agent. Overload of OnAmbientProperty() method of CHtmlView cla...

Problem running my project in IE 6.0 and 7.0 (window.location)?

My project is running perfectly in Firefox, google chorme and IE 8.0 But it is not working on IE 6.0 or 7.0 I realized that it is given problem at window.location I am placing my code over here to show what i am doing. function GetEmailId() { var url="http://server.com/GetPostEmail.php"; url=url+"&sid="+Math.random(); ...

jQuery.post() Using serialized form data, and custom object in submission.

When doing ajax stuff with jQuery you can pass your data along to the server in two key ways: Use an object like { firstname:'blah', lastname: 'derp' } Use a string like &firstname=blah&lastname=derp (1) Arises naturally when you're passing in values programatically. (2) Arises naturally when you've got input fields. My problem: it...

Problem running AJAX properly on IE6 and IE7

I have this code, which is working fine in FireFox, chrome and IE8 but is it not working on IE6 and IE7. function GetXmlHttpObject() { //var xmlHttp = null; try { xmlHttp = new XMLHttpRequest(); } catch (e) { try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp = new ActiveXObject("Mi...

RJS not updating html table elements

I have a link_to_remote function that updates columns in a table. However, it does not properly update the cell or its properties. For example: Here is the element I am updating: <div id= "calendar_div_<%= i%>_<%=j%>" style = "display :inline;"><td class="checkedout">X</td></div> Using this call: <%= link_to_remote 'Current Wee...

tabIndex Attribute and AJAX

I've seen some posts about tabIndex issues, but I was unable to find one like the scenario below that I need to fix. So here's the lowdown on the project. It's an ASP.NET 2.0 web app using AJAX 1.0 Extensions and jQuery. I'm looking for any ideas from any programming language to handle a scenario like this. So first off, I know how to...