Connecting Tech Pros Worldwide Forums | Help | Site Map

script functions in <script> tag

kal
Guest
 
Posts: n/a
#1: Aug 6 '07
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 <headtag.

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

Kal


David Mark
Guest
 
Posts: n/a
#2: Aug 6 '07

re: script functions in <script> tag


On Aug 6, 6:07 am, "kal" <a...@noplace.comwrote:
Quote:
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 <headtag.
That seems backwards.
Quote:
>
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.


kal
Guest
 
Posts: n/a
#3: Aug 6 '07

re: script functions in <script> tag


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







"David Mark" <dmark.cinsoft@gmail.comwrote in message
news:1186395045.139380.219520@e9g2000prf.googlegro ups.com...
Quote:
On Aug 6, 6:07 am, "kal" <a...@noplace.comwrote:
Quote:
>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 <headtag.
>
That seems backwards.
>
Quote:
>>
>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.
>
>

kal
Guest
 
Posts: n/a
#4: Aug 6 '07

re: script functions in <script> tag


Ive solved this thanks -


Closed Thread