The example code in the "ASP.net 2.0 no Refresh page development" solution for Firefox compatibility

Source: Internet
Author: User
asp.net| | sample | refresh | no Refresh | page

These days are beginning to start writing graduation design, because something happened, so have been dragged until now to start.
In fact, I'm going to do a asp.net 2.0 and use AJAX Web projects, so I went to the blog Park looking for Ajax articles, just turned to Leon.zhou asp.net 2.0 official version of the No Refresh page development
Follow the code examples and explanations to make a page that's really nice. Because I almost always use Firefox, so I just tested the effect of Firefox, the results found that the button was not after the response ...
So open the JavaScript console and say that LABEL1 is not defined
Again looked at the source code, <span id= "Label1" ></span> lay there
After n minutes Skip < br> Anyway, I thought about what I did two months ago. As if there was a similar phenomenon in Firefox, at that time to solve, turn out the code
Firefox cannot be referenced directly by ID
The solution is to use the getElementById () method of document to return the < Br>receiveserverdata () method.

function Receiveserverdata (result, context)
{
document.getElementById (context.id). Innerhtml=result;
}
So IE and Firefox can be used normally
Finally, thanks again for Leon.zhou's article.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.