views:

27

answers:

1
<script language="JavaScript1.2" src="aj.js">

I am calling function a() for my image onload event .but i am getting the error - function a() [a.js has function] is not defined.

How to resolve this issue

+1  A: 

Add a closing script tag. Also mime type is more important than the "language" attribute, which pretty much every browser ignores.

<script type="text/javascript" language="JavaScript" src="aj.js"></script>

This, of course, assumes your src points to the right location.

Triptych
Still its shows the same error
joe