By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,672 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

Simple Java Question

P: 5
This is example of my page:
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <JAVA>
  4. </JAVA> 
  5. <title> my title </title>
  6. </head>
  7. <body>
  8. </body>
  9. </html>
Ok. I can only add java script codes in block <JAVA> and </JAVA>
I add this code in above block:
<script type='text/javascript' src='external script url' ></script>
I want this basic script don’t run in JAVA block ( <JAVA> ) and I call it in body
How can I simply call this basic code in body tag? (I can't add java script codes in body)
Aug 31 '11 #1
Share this Question
Share on Google+
8 Replies


Dormilich
Expert Mod 5K+
P: 8,639
you canít. <java> is an invalid/unknown HTML tag, hence nothing will happen. to execute JavaScript code use the aforementioned <script> tags.
Aug 31 '11 #2

P: 5
<java> isn’t my tag, this is an example.
I want call my scripts that are in <script> tags, to run in another place. can u understand my language?! I can't type English correctly!
Sep 1 '11 #3

Dormilich
Expert Mod 5K+
P: 8,639
I want call my scripts that are in <script> tags, to run in another place.
won’t work. if you want to run a script, use <script> tags. period.

PS. English ain’t my mother tongue either
Sep 2 '11 #4

P: 5
Can't I use function rule?
Please learn me.
Sep 2 '11 #5

Dormilich
Expert Mod 5K+
P: 8,639
what is function rule?
Sep 2 '11 #6

Dormilich
Expert Mod 5K+
P: 8,639
that’s JavaScript. and JavaScript only works from <script> tags.
Sep 2 '11 #8

drhowarddrfine
Expert 5K+
P: 7,435
To expand a bit, JavaScript is not Java.
Sep 2 '11 #9

Post your reply

Sign in to post your reply or Sign up for a free account.