|
View previous topic
::
View next topic
|
| Author |
Message |
anand
Guest
|
Posted: Mon Feb 23, 2004 10:25 pm
Post subject: web design doubt
|
|
|
can anyone tell me how to paste more than 2 java scripting codes in an html file.
thank you,
anand. |
|
| Back to top |
|
 |
Debs
Joined: 16 Aug 2003
Posts: 4296
Location: NY
|
Posted: Mon Feb 23, 2004 11:34 pm
Post subject:
|
|
|
It would help a lot if we knew what codes you were trying to put in, and what the requirements were for each code. Some codes have to go into the <head> section, others go into the <body> section, and still others need to have portions in both <head> and <body> sections.
Debs _________________ Learn how to turn keyphrases into quality, well-targeted articles your visitors and SE's will love with Gary Antosh's new ebook "Web Content Made Easy!" |
|
| Back to top |
|
 |
OleTom
Joined: 03 Jan 2004
Posts: 94
Location: Jax Beach FL
|
Posted: Tue Feb 24, 2004 2:28 pm
Post subject:
|
|
|
Here is a good way
<SCRIPT LANGUAGE="text/javascript" src="YourJavaScript.js"></SCRIPT>
HowToDo:remove <script type="text/javascript"> from the top of your script then put script on notpad and save as whatever.js and use
<SCRIPT LANGUAGE="text/javascript" src="whatever.js"></SCRIPT> any where in the body or head of your page to call it up
BTW make sure you put the js file in the same directory as the page or change the path.
<SCRIPT LANGUAGE="text/javascript" src="/Directory/whatever.js"></SCRIPT> _________________ Life is Good,OleTom
World Wide Job Search
Last edited by OleTom on Tue Feb 24, 2004 3:30 pm; edited 2 times in total |
|
| Back to top |
|
 |
Debs
Joined: 16 Aug 2003
Posts: 4296
Location: NY
|
Posted: Tue Feb 24, 2004 3:16 pm
Post subject:
|
|
|
<SCRIPT LANGUAGE="JavaScript1.1" ...> is no longer supported standard. It will still work for now, but the standard is now:
<script type="text/javascript" ...>
Debs _________________ Learn how to turn keyphrases into quality, well-targeted articles your visitors and SE's will love with Gary Antosh's new ebook "Web Content Made Easy!" |
|
| Back to top |
|
 |
OleTom
Joined: 03 Jan 2004
Posts: 94
Location: Jax Beach FL
|
Posted: Tue Feb 24, 2004 3:27 pm
Post subject:
|
|
|
Thanks Debs I haven't used java for a while and I guess things are changeing  _________________ Life is Good,OleTom
World Wide Job Search |
|
| Back to top |
|
 |
Charlie
Joined: 22 Aug 2003
Posts: 3305
Location: UK
|
Posted: Tue Feb 24, 2004 4:07 pm
Post subject:
|
|
|
Rhetorical question:
What's the difference between java and javascript?
Just a thought,
Charlie. _________________ "Before I speak, I have something important to say."
- Groucho Marx |
|
| Back to top |
|
 |
Yaron
Joined: 13 Nov 2003
Posts: 196
Location: New York City
|
Posted: Tue Feb 24, 2004 5:18 pm
Post subject:
|
|
|
| Charlie wrote: | Rhetorical question:
What's the difference between java and javascript?
|
Hi Charlie.
Well, even though it's a rhetorical question, I'm going to answer it anyway.
There is almost no relation between Java and JavaScript aside from the fact that they are both programming languages, and they have the word "java" in their names.
Java is a general purpose programming language invented by people at Sun Microsystems.
JavaScript is a language you use on a Web page to make a Web browser do things.
I believe JavaScript is named as it is because Netscape came out with it a little after Sun came out with Java, in 1995. At that time Java was generating a buzz, and Netscape wanted to ride on Sun's coattails. It was supposed to be named "LiveScript", I think, and Netscape changed it at the last minute.
It might have been a smart marketing move, but its legacy is quite confusing and unfortunate. My "favorite" thing to see is bookstores put books on Java and JavaScript intermixed on the same shelf. If they do that, they could just as well put books on cooking and auto repair on the same shelf too.
Regards,
Yaron |
|
| Back to top |
|
 |
Warburton
Joined: 14 Nov 2003
Posts: 136
Location: London
|
Posted: Thu Feb 26, 2004 12:33 am
Post subject:
|
|
|
Quite right.
JavaScript (LiveScript) has absolutely nothing to do with Java.
You can think of programming languages in four levels:
Level 4: Markup languages like XML, SGML, HTML etc.
Level 3: Scripting languages like Javascript, Perl, ActiveX etc.
Level 2: Programming languages like Java, C++, C etc.
Level 1: Machine code
Level 4 is the simplest for humans to write and needs the most interpretation and Level 1 is the simplest for machines to understand and needs the least interpretation. |
|
| Back to top |
|
 |
Yaron
Joined: 13 Nov 2003
Posts: 196
Location: New York City
|
Posted: Thu Feb 26, 2004 5:29 am
Post subject:
|
|
|
| Warburton wrote: | Quite right.
JavaScript (LiveScript) has absolutely nothing to do with Java.
|
Hi Warburton.
I'm glad you agree with me on the JavaScript/Java issue.
| Quote: |
You can think of programming languages in four levels:
Level 4: Markup languages like XML, SGML, HTML etc.
Level 3: Scripting languages like Javascript, Perl, ActiveX etc.
Level 2: Programming languages like Java, C++, C etc.
Level 1: Machine code
Level 4 is the simplest for humans to write and needs the most interpretation and Level 1 is the simplest for machines to understand and needs the least interpretation. |
I think you're confusing what you're saying with something else.
There is what is called a "generation" for a programming language, i.e., 1GL, 2GL, 3GL, 4GL. Where roughly speaking, 1GL is machine code, 2GL is assembly, 3GL is languages like C, and 4GL is languages of higher abstraction.
The examples you give don't fall within those GL categories, though. ActiveX is not a programming language at all, it is an interface specification. Neither are XML, SGML, and HTML. They are markup, not programming languages. All they do is describe data, not execute commands.
Regards,
Yaron |
|
| Back to top |
|
 |
edburdo
Joined: 14 Jul 2003
Posts: 1760
Location: Bangor, Maine
|
Posted: Thu Feb 26, 2004 1:26 pm
Post subject:
|
|
|
And the lines between a "scripting" language and a "programming" language are becoming more and more blurred. Once upon a time, there was a distinction. There really isn't anymore.
Perl can be compiled into a executable now. Both in the .Net framework, or as a standalone exe.
ASP.Net is standing the web development world on its head. All the complicated stuff is becoming easier and easier.
And I agree with Yaron on the generations of languages. 3GL and 4GL can be a bit difficult to difrentiate sometimes. _________________ Eric D. Burdo
They Made $6,513 a day With Clickbank Doing This... |
|
| Back to top |
|
 |
Charlie
Joined: 22 Aug 2003
Posts: 3305
Location: UK
|
Posted: Thu Feb 26, 2004 3:52 pm
Post subject:
|
|
|
| edburdo wrote: | | And the lines between a "scripting" language and a "programming" language are becoming more and more blurred. Once upon a time, there was a distinction. There really isn't anymore. |
PHP is another example...
Apparently it's possible to use this "scripting language" for writing applications now, too.
Cheers,
Charlie.
P.S. If "rhetorical questions" are this good at continuing threads, I can see myself using them more in the future.  _________________ "Before I speak, I have something important to say."
- Groucho Marx |
|
| Back to top |
|
 |
Yaron
Joined: 13 Nov 2003
Posts: 196
Location: New York City
|
Posted: Thu Feb 26, 2004 10:41 pm
Post subject:
|
|
|
| Charlie wrote: | P.S. If "rhetorical questions" are this good at continuing threads, I can see myself using them more in the future.  |
Continue, yes, but not quite on topic.
- Yaron |
|
| Back to top |
|
 |
Warburton
Joined: 14 Nov 2003
Posts: 136
Location: London
|
Posted: Sat Feb 28, 2004 1:58 am
Post subject:
|
|
|
I stand corrected.
Thanks for setting me straight, Yaron. |
|
| Back to top |
|
 |
Yaron
Joined: 13 Nov 2003
Posts: 196
Location: New York City
|
Posted: Mon Mar 01, 2004 1:52 am
Post subject:
|
|
|
| Warburton wrote: | I stand corrected.
Thanks for setting me straight, Yaron. |
Glad to be of service.
- Yaron |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|