Click to See Complete Forum and Search --> : Syntax Error
Buddy311
08-29-2003, 11:46 AM
This Java Script is giving me a syntax error, but when i refrest the page, it goes away. I dont understand if anyone could help it would be great.
<script>
if (ns6)
window.onload=new Function('loadwindow("http://www.geocities.com",200,300)')
else
loadwindow("http://www.geocities.com",200,300)
</script>
<script>
soccer362001
08-29-2003, 12:25 PM
A syntax error is usually a server problem.
Buddy311
08-29-2003, 03:09 PM
YA, i fixed it myself i just removed the If, Vaiable, and the else and it worked, with no errors, thanks for the reply that is good to know.
AdamGundry
08-29-2003, 04:11 PM
A syntax error is a syntax error, i.e. a mistake in the script or program's code that is not accepted by the interpreter or compiler and instead generates an error. For example, an invalid if construction in Javascript (as you appear to have had).
If the code is client-side (like Javascript) then the error is in the client-side Javascript code. If the code is server-side (e.g. PHP) then the error is in the server-side PHP code. You cannot generalise and say syntax errors are usually server-side.
Adam