XmlHttpRequest 반복설정
- <html>
- <head>
- <script type=”text/javascript” src=”xmlhttp.js”></script>
- <script type=”text/javascript”>
- var AJAX_URL=”http://www.fettig.net/playground/ajax-subdomain/ajaxdata.php”;
- function gotResult(status, headers, result) {
- var oldDomain = document.domain;
- document.domain = “fettig.net”;
- window.parent.gotTime(result);
- document.domain = oldDomain;
- setTimeout(getTime, 1000);
- }
- function getTime(){
- getUrl(AJAX_URL, gotResult);
- }
- getTime();
- </script>
- </head>
- </html>
- <head>
**parent frame에 접근을 가능케 하기 위해 fetting.net 으로 설정하는것임
'PROGRAMMING' 카테고리의 다른 글
| XmlHttpReques 2 (0) | 2008/05/15 |
|---|---|
| XmlHttpReques 1 (0) | 2008/05/15 |


이올린에 북마크하기