script functions in <script> tag

K

kal

Hi

I have a aspx page that has a function in a script tag which is called from
code in a javascript src file that is loaded in the <head> tag.

the thing is that that browser complains that it cant find this function -
any ideas?

Kal
 
D

David Mark

Hi

I have a aspx page that has a function in a script tag which is called from
code in a javascript src file that is loaded in the <head> tag.

That seems backwards.
the thing is that that browser complains that it cant find this function -
any ideas?

What function? I can't find it either. Post the code.
 
K

kal

Hi Mark,


in my aspx page i have

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

in the head tag.

and then in the body tag i have
<script language="javascript">

function shout()

{ alert("hello");}

</script>


in mag.js i simply put

shout();

The error i get is that shout is not defined

if i copy the function to the js file it works. but i need it in the aspx
file

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top