Why does Aptana blame a mistake in this code?

I copied this page , the source in the Aptana IDE for javascript. But in the last lines:

<script language="JavaScript"> init(); </script> </body> </html> 

it appears in the init() : syntax error , why? (at startup, it works correctly)

+4
source share
4 answers

There is no semicolon. Change

 <input type="reset" onclick="lines=0;return true"> 

to

 <input type="reset" onclick="lines=0;return true;"> 
+2
source

Change it to

 <script type="text/javascript"> 
+2
source

I can not reproduce this. Copying / pasting the code from this page into Aptana does not give me any errors. Make sure that a) you have the latest version of Aptana installed, and b) your code does not have any strange cop / paste artifacts. Try to insert the notepad first, and then from there into Aptana, delete the formatting information and see if this has changed.

alt text

+1
source

If you are copying / pasting, the editor may have invalid characters, try checking the β€œor” and replace them with regular quotes and doboule quotes.

Copy Paste source codes causing this problem.

0
source

All Articles