|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
javascript error
<body onload=doLoad();>
<script> could anybody tell me y i'm getting javascript error when i try to execute this code code: function doLoad() { <? $url = "http://"; $data = file($url); for($i=0; $i<count($data); $i++) echo $data[$i]; echo "hello"; ?> //refresh value every 2 second setTimeout( "doLoad()", 2*1000 ); } </script> </body> |
|
#2
|
|||
|
|||
|
RE: javascript error
well, PHP only runs on the server (before the page is actually sent to the user), and JavaScript only on the browser... What you're trying to do is to mix the two...
Try viewing source in your browser, to see what it receives, you'll know what I mean. |
|
#3
|
||||
|
||||
|
RE: javascript error
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > javascript error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|