brettr
asked on
How to clear page content?
I'm doing an AJAX request and get the response from XMLHttpRequest.responseTex t. The code behind (ASP.NET 2.0) does a Response.Write(mystring). In JavaScript, I then parse out mystring, since all of the other aspx page's HTML content is still there. mystring is at the top of the response, followed by the page's HTML layout content. To avoid parsing, how can I send back the response (mystring) only without the HTML page content?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The asynch call request the same aspx page it is linked into. That's why I want to return on the requested content. But since I'm calling the same page, I get all of the HTML layout mixed in as well. Then again, maybe I don't understand what you mean.
I do have a server side HTML DIV tag that has its innerHTML loaded from the code behind on initial page load. I get content from it using the JS. On the async call, I can assign the requested content to this DIV. The problem is that it won't refresh client side since that part of the page isn't getting a partial update.