2012-12-18 1 views
1

으로, 나는 자동으로 게시물에 iframe이 새로 고침하려면 다음 코드를 사용하는 데 사용 :새로 고침 IFrame을 워드 프레스 3.5 이전 워드 프레스 버전으로

<iframe id='feuille1' src="http://competition.hockeyfrance.com/la/ffhgsheet.php?GameID=20094" width="650" height="1000" name='feuille1' ></iframe> 
<script type="text/javascript"> function refreshiframe() { document.getElementById('feuille1').src="http://competition.hockeyfrance.com/la/ffhgsheet.php?GameID=20094" setTimeout("refreshiframe()",30000); } </script> 
<body onload="refreshiframe();"> 

코드는 단축 코드를 사용하여 게시물에 포함됩니다. 이것은 잘 알려진 최신 3.5 업데이트가 jQuery의 업데이트 된 버전을 포함 할 때까지 잘 동작했습니다.

왜이 간단한 코드가 더 이상 작동하지 않는지 이해할 수 있습니까? 문제를 해결하려면 어떻게해야합니까?

답변

0

변경이 :

<script type="text/javascript"> function refreshiframe() {document.getElementById('feuille1').src = "http://competition.hockeyfrance.com/la/ffhgsheet.php?GameID=20094" setTimeout("refreshiframe()",30000); } </script> 

다음과

<script type="text/javascript"> function refreshiframe() {document.getElementById('feuille1').src = "http://competition.hockeyfrance.com/la/ffhgsheet.php?GameID=20094"; setTimeout("refreshiframe()",30000); } </script> 

주목하라 ;setTimeout 함수를 호출 src 다른 변경을위한 두 가지 JS 지시 번 나누어.

행운을 빈다.

+1

그게 전부 야! 여기 당신의 도움에 많은 감사드립니다. 그냥 오타를 놓 쳤어. 문제가 해결되었습니다. – user1912177

+0

세미 콜론은 엉덩이에 통증이 될 수 있습니다! 행운을 빕니다! –