473,473 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

script functions in <script> tag

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 <headtag.

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

Kal
Aug 6 '07 #1
3 1329
On Aug 6, 6:07 am, "kal" <a...@noplace.comwrote:
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.
>
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.
Aug 6 '07 #2
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



"David Mark" <dm***********@gmail.comwrote in message
news:11**********************@e9g2000prf.googlegro ups.com...
On Aug 6, 6:07 am, "kal" <a...@noplace.comwrote:
>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.
>>
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.


Aug 6 '07 #3
kal
Ive solved this thanks -
Aug 6 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Madhav | last post by:
I have the following statements in my script. ---------------------------------------------------------- textToWrite = "<HTML> \n" + "<HEAD> \n" + "<TITLE>Calendar</TITLE> \n" + "<SCRIPT...
10
by: Blue® | last post by:
I would like to call the content of content.htm (containing only HTML codes) into index.htm. This is usually done by renaming index.htm to index.shtml and use this tag: <!--#include...
1
by: Grzegorz ¦lusarek | last post by:
Hello everyone. I1m writing webb aplication using AJAX (prototype library: http://prototype.conio.net/ and scriptacuolous:http://script.aculo.us/). My Problem is that that I'm doing...
1
by: andrew | last post by:
So I spent ages trying to work out what the problem was with my code when I did this and found a post which led me to the very simple solution. I use WebMatrix so I'm not sure if this is a major...
44
by: rhythmace | last post by:
W3C HTML validator passes this: .... <script type="text/javascript" src="foo.js"> <script type="text/javascript"> ....script in here... </script> ....
2
by: -Karl | last post by:
Couls someone please advise me on this error. What I am trying to do is be able to convert an XML document into arrays. I read that the subs & functions have to be in <scripttags. Thanks! ...
3
by: joe | last post by:
Is it OK to have multiple: <script type="text/javascript" src="funcs1.js"></script> <script type="text/javascript" src="funcs2.js"></script> <script type="text/javascript"...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.