ajax

ASP.NET MVC - Returning data as HTML or XML

When requesting http://someserver.com/user/btyndall I'd like to return HTML When requesting http://someserver.com/user/btyndall?format=xml I'd like to return XML representation of my model I've downloaded MvcContrib. (I can't believe XmlResult is not a part of the core framework) What is the proper way to handle the request in the cont...

How can I have multiple UpdateTargetIds for AjaxOptions while using Ajax.BeginForm

I am using Ajax.BeginForm in ASP.NET MVC to post a form. I have one div being updated using AjaxOption's UpdateTargetId property. Now I need the post to update 2 Divs. I also need to return 2 different views. Here is the code that I have presently: <%using(Ajax.BeginForm("Create", new { controller = "View"},new AjaxOptions { UpdateTar...

XML to JavaScript hashes/arrays on the client

Any client js libraries for turning XML into a JavaScript object? I'm specifically working with RSS and ATOM XML. I don't want to go from XML to JSON then eval(). I'd like to go from XML directly to JavaScript hashes/arrays. ...

ajax treeview asp.net

Hi, I am looking for a treeview control for ASP.NET 2.0 that supports AJAX. Can be commercial or free. Any recommendations? Thanks in advance ! ...

Does php execution stop after a user leaves the page?

I want to run a relatively time consuming script based on some form input, but I'd rather not resort to cron, so I'm wondering if a php page requested through ajax will continue to execute until completion or if it will halt if the user leaves the page. It doesn't actually output to the browser until a json_encode at the end of the file...

Javascript IE and getElementsByClassName problems

So first off I am learning JS and will not use a library until I know all I need to. http://www.tombarrasso.com/search/ With that said why on earth does my code not work in < IE 7, Firefox < 3, etc? Safari 4 is perfect, Firefox 3.5 is great, etc. I am using the function getElementsByClassName from Robert Nyman. It generates no errors ...

Scraping Ajax - Using python

I'm trying to scrap a page in youtube with python which has lot of ajax in it I've to call the java script each time to get the info. But i'm not really sure how to go about it. I'm using the urllib2 module to open URLs. Any help would be appreciated. ...

Client-side technology for a web-based game

I am developing a web-based game (similar to the ESP game), I am done with the server side SOAP web service (built on ASP.NET), and now I am wondering if I should use Flash (swf) or AJAX for the client side layer of the game. Basically, the client side is a web service client making requests to the web server and receiving back instructi...

Scrollup the div in updatepanel

Hi I need to scroll up the div as the new text comes in. My div is in Updatepanel and i am getting this error "get("divChatMessage") is null" Here is my code:- <script type="text/javascript"> function ScrollToBottom() { $get('divChatMessage').scrollTop = $get('divChatMessage').scrollHeight; } </script> <div id="divMessage" run...

Jquery, Ajax form and redirection

Ok, I need to use ajax for some fancy pop-ups and validation things but I want to avoid javascript redirect if everything is ok in form. Here is the basic-simple scenario. We have dynamic site and some user login form. Al logic (does user exist, is password ok etc) is on a server side. Server pseudo code look like this: $username,$p...

Consuming Zend_Rest_Server response with jquery

Is there is standard way to consume Zend_Rest_Server response with jquery? I have a simple web service that I need to invoke and process result with ajax, preferrably JQuery. I assume I can parse xml response somehow, but that doesn't look like a mature solution. ...

How to add custom text input to images dynamically

Could any one please give me pointers as to how one can add text to images dynamically. For example a person fills up text form and selects an image . Then after clicking the submit button the text input by the visitor gets added to the image. To understand it better please check : http://www.vistaprint.com/ . In this site this has been ...

Automatic Request to a web Page

Hi, i m trying to implement this thing , that when ever a person opens up a page an automatic request goes to some server . i m doing this with ajax by calling a function on onload event of body .. but it is giving me Access Restricted to URI 1012 error .. then i used jquery .. and used its post() method .. now it is giving me 403 Forbid...

What are good practices for URL design in one page web apps (I use Dojo)?

I'm wondering about HTML reuse when using Ajax (specifically Dojo). So let me set the context: Context Say I have index.html with some *.js included files at http://host/site/ that consumes some REST service say http://host/rest/xxxx/yy The user interacts with http://host/site/{index.html} and everybody is happy. I'm pondering what h...

Getting a specific line using jQuery

Hello, Is there a way to get, let say, the 5th line ( the offset of its first letter ) of a block's content using jQuery ? I mean the visual line, the browser computed line, and not the line in the source code . ...

Simple page submit - vs - Ajax loader

There are many ways to handle forms. one is to simply submit the form and the get variables on php and another one that i'm thinking of, is to send data with ajax and during this process we can show a dialog and show the information about processing the data with a progress bar. despite the fact that ajax is faster than the standard tec...

access denied using asp's MSXML2.XMLHTTP

Set oXMLHttp=Server.CreateObject("MSXML2.XMLHTTP") On Error Resume Next oXMLHttp.open "GET", "http://xxxxxx.com",False oXMLHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" oXMLHttp.send() x = oXMLHttp.responseText I'm getting this error: Access Denied ...

How to return a file via Web Service

I am working on a Web Service where the user would input parameters and have the option of have the data returned in various file formats (xml, html (on screen), csv, etc.). If the server generates the file content (and therefor there is no actual file), then returning a URL to the file is not an option. So how can this be done? I kno...

Why is it a bad practice to return generated HTML instead of JSON? Or is it?

It is quite easy to load HTML content from your custom URLs/Web services using JQuery or any other similar framework. I've used this approach many times and till now and found the performance satisfactory. But all the books, all the experts are trying to get me to use JSON instead of generated HTML. How's it much more superior than HTML...

Loading AJAX with Jquery Issue

I have this ajax call for loading a selection of data in xml. I am not getting any JS errors, it does the before, the complete is not working, I guess I am not calling the data correctly. Any thoughts on what I am doing wrong in the complete function loop? $.ajax({ type: "GET", url: "xml/classes.xml", dataType: "XML", before...