ajax

mysql and php count problem..

i have count problem in php... i create drop down list dynamically from mysql...and what i want is when i select the first drop down menu how can i get the search result count..like 10 products from databse.. look my code.. ajax..file var xmlHttp function showCount(str) { xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert ("Yo...

Recommendations for AJAH Library

I have a classic ASP application I would like to add some AJAX-style partial page updates to avoid server roundtrip. For example, list of rows displayed, option to add another in-situ, save it, and table redisplayed / add another. I don't think I need all the other baggage of the well known AJAX libraries I would appreciate suggestio...

Scrolling a page using location.hash in Safari

I have a forum page that displays a tree view of messages below the currently selected message. When you click on a message in the tree the new message body is loaded into a div near the top of the page using AJAX and then the following code is run: window.location.hash = "page_top"; Of course "page_top" is an anchor element near the ...

Should I add AJAX logic to my PHP classes/scripts?

I just started making a PHP/AJAX site and I was wondering where I should add the functionality to "only include the content". Should I have if statements in my header and footer scripts that check for a "ContentOnly" get parameter? And then append that parameter to the query strings in my AJAX calls? Or should I use a filter on the AJ...

Ajax: Definition vs Implementation? (XML vs JSON vs Other)

AJAX actually means Asynchronous Javascript And XML. This term was derived because (as I know the story) the first people who started this process transferred data from the server to the client via XML. Lately (well ever since I've started using it actually), JSON has been around and appears to be a real alternative to XML. From my (p...

How To Elegantly Handle JSON Objects in Responses From Ajax Requests?

I'm really new to using JSON to handle my Ajax Request and Response cycle. I've previously used just plain old parameters passed as POST data and I've rendered straight HTML in the response which was then placed into the DOM. As I've looked at various examples and read through various tutorials, it seems like a fairly common practice to ...

Howto: PHP/Javascript communication

As I'm developing my WebIDE, I keep coming up with questions that I cannot answer myself. This is because the project is supposed to help others create what they would "normally" create, but faster (i.e. as automated as possible). In this light, my question is how to you implement a PHP backend? Here is what I do. I like to create "f...

I am looking for a webbased text editor that supports collaboration

I am looking for a web based text editor that supports collaboration with 2 or more people. I am hoping to work on a fairly 'small' project with a couple other people from afar and would really like for us to be able to work on the same file at the same time and see the changes each other make in 'real time'. Language built on is not m...

ASP.NET & AJAX threading

Referencing this question: http://stackoverflow.com/questions/435492/is-asp-net-multithreaded-how-does-it-execute-requests, would this be a correct interpretation of threading: ASP.NET has one worker process per application instance. It is multi-threaded, using its own application pool. The majority of threads are used for servicing...

Lets solve cross-domain ajax, totally on the client, using script tags.

I know, there's JSONP, which involves server cooperation to name-space the data. What is bothering me is the fact that the content of script tag src is evaluated, but it's NOT available to read. <script src="http://www.google.com"&gt;&lt;/script&gt; All we need to figure out is how to namespace the data, that's all. Of course I tried...

Adding controls dynamically to an UpdatePanel in ASP.NET AJAX

I have the following really simple code <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:PlaceHolder ID="PlaceHolder1" runat="server"> </asp:PlaceHolder> <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1...

Graceful degradation - when to consider

When designing and building the UI for an application that uses AJAX, when do you consider graceful degradation (for users who have JavaScript disabled, or are using a screen reader)? At the end, once the AJAX version of the site is completely finished At every stage of development I don't Something else... ...

List of Links

I have two tables, one for Regions and one for those regions Areas, i want to automatically create a list of links that will be like: Region1 a.Area1 b.Area2 c.Area3 Region2 a.Area1 etcetc This link should be generated automatically when i load my page. The items in the list are not only text, when i click on Area1 i will call a...

jQuery AJAX Character Encoding Problem

Hi everyone, I'm currently coding a French website. There's a schedule page, where a link on the side can be used to load another day's schedule. http://aquate.us/film/horaire.html (At the moment, only the links for November 13th and November 14th work) Here's the JS I'm using to do this: <script type="text/javascript"> function l...

In MVC, how do I return a string result?

Hi, In my ajax call, I want to return a string value back to the calling page. Do I still using ActionResult or just return a string? ...

Javascript Memory profiling - IE6

We have an application that behaves really badly in IE6, the application relies heavily on javascript and most of the activity happens in one page. In IE6, it seems that memory keeps piling up and never gets cleared even when you navigate to a different site! Since there's not so little code running within the browser, I'm looking for ...

consecutive, not concurrent jQuery AJAX posts

I'm probably missing something obvious, but I don't seem to be able to get my AJAX posts to run consecutively instead of concurrently with jQuery. ad_numbers is an array of numeric IDs. $(ad_numbers).each(function() { ad_number = $.trim(this); if(!ad_number) { return true; } $.post('/fetch.php', { ad_number: ad_number }, functi...

Is there a way to call server side Groovy object method from client side JavaScript code via AJAX?

There is DWR which satisfies my needs in Java. I'm interested if there is any Groovier way to do the same thing - with convention over configuration, dynamic method invokation, etc. ...

Adding additional HTML rows: where to put the code?

I have the following situation: <table><tr><td width="50"> <select name="angle"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> </select> </td><td> <input type="text" name="what" value="" /> </td></tr></table> <...

Click on div, but want child elements to react to click

Hi, My dom looks like this: <div class="profile"> <a href="#"><img src="/img1.gif" /></a> <b>100</b> <a href="#"><img src="/img2.gif" /></a> </div> Ok so I have many of these elements on my page, so using jQuery I bind all the events like this: $(".profile").live('click', myCallback); var myCallback = function(event)...