|
xmlhttprequest javascript
|
|
|
| |
Реклама / Advertisment
|
| |
Википедия
...
|
| |
Ссылки
|
|
|
| |
Блоги
http://jonsunhee.wordpress.com/2008/08/28/ajax-va-web-20-ph%E1%BA%A7n-1/ Ajax và Web 2.0 phần 1 (by: jonsunhee) Bài viết này giới thiệu một số kiến thức cơ bản của Ajax như thao tác trên đối tượng <b>XMLHttpRequest JavaScript</b> được tạo ra và sử dụng bởi browser để thực hiện sự thông tin bất đồng bộ tới backend server cho tới những ứng dụng nâng cao <
http://www.cmsno.info/html/7469.html ASP设计博客教程(六) (by: admin) 3,建立要连接的url,因为涉及到数据库,<b>javascript</b>无法进行数据库的读取,所以我们单独建一个处理的文件,reg1.asp。并把参数传给他。 4,打开到服&
http://albertux.ayalasoft.com/2008/08/27/safe-and-dirty-remote-xmlhttprequest/ Safe and Dirty Remote <b>XMLHttpRequest</b> (by: albertux) Safe and Dirty Remote <b>XMLHttpRequest</b> Sometimes we need <b>XMLHttpRequest</b> work on diferents domains (cross domains) give you a simple solution, you need <b>Javascript</b> and Perl: The <b>XMLHttpRequest</b>(); example: var req u003d new <b>XMLHttpRequest</b>() <b>...</b>
|
| |
Видео
|
|
|
| |
Загрузки
|
| |
Определение
No definitions found for xmlhttprequest javascript.<br /><hr width="80%" />
|
| |
Вопросы и ответы
Using XMLHTTPRequest in javascript to verify if URL is working? I want to verify if a link is working before I display some content in the iframe. I used XMLHttpRequest to open the page and check the status.
The function gives error ‘access is denied when run locally, hence I hosted the same on some webserver.
Here the event onreadystatechange is never executed. I tried both sync and async open. Any inputs on how to resolve this will be useful.
<<CODE SNIPPET START>>
var urlObj = null;
if ( window.XMLHttpRequest ) {
urlObj = new window.XMLHttpRequest();
}
urlObj.open( "HEAD", strUrl, true ); // true = async, false = sync
urlObj.onreadystatechange = function()
{
alert(urlObj.readyState);
if ( urlObj.readyState == 4 ) {
if (( urlObj.status == 200 ) { alert( "Server replied OK" ); }
else { alert( "There was a problem: " + urlObj.status ); }
}
}
<<CODE SNIPPET END>>
Thanks & Regards,
Chandra
your problem is that you wrote all that code without knowing that ajax has a security model makes it impossible to reference a foreign hosted http object.
strUrl is pointing somewhere you can't get to!
and you got a state/status error that tells you so.
Do search bots 'see' html generated by xmlhttprequest? I'm wondering if search bots, such as google's and yahoo's can see/read html code generated by xmlhttp requests. I ask becuase i have a site that uses javascript in conjunction with xmlhttprequest to generate menus and dynamic content. I need to make sure that a search bot can get to it. Please provide sources for your answer. thanks.
there are ways to get a search engine to look at your dynamic content!
the simplest way is to manually include the extra content inside a <noscript> tag!
a more exotic way is to use the <noscript> tag to hide a bunch of links to your content that you want indexed.
the best way is to modify the program that generates the html to make a special version that google/yahoo or any other search engine you care about will read! This entails programming, I've done it in perl, but it can be done in any language that serves html pages (or even the apache webserver configuration!). The key is redirecting or just adding extra content when the userAgent is actually a spider/bot
|
|