View Full Version : I Have one simple problem!
nadzD
01-01-2005, 08:52 AM
ok, I use www.friendpages.com to create my website and i cannot get any types of Java Script to work!!
It doesn't even work if i delete all of my site and just type this simple HTML:
<HTML>
<HEAD>
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
<--!
alert("Welcome to my website!")
//-->
</SCRIPT>
<BODY>
</BODY>
</HTML>
I know this isnt specifically related to Dynamic Drive but could someone please tell me what im doing wrong?? I'd really appreciate it,
thanx,
Nadine.
cr3ative
01-01-2005, 09:40 AM
Try this:
<HTML>
<HEAD>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<--!
alert("Welcome to my website!")
//-->
</SCRIPT>
</BODY>
</HTML>
cr3ative
mwinter
01-01-2005, 07:22 PM
Java ScriptJavascript[1] is one word. Anything else would imply something related to Java.
It doesn't even work if i delete all of my site and just type this simple HTML:That "simple" HTML is invalid. Trying to do anything sensible with invalid HTML is (generally) a waste of effort. Always validate (http://validator.w3.org/) your mark-up.
<HTML>
<HEAD>
</HEAD>All HTML documents require a title element.
<SCRIPT LANGUAGE="JavaScript">The language attribute has been deprecated for over six years. Use the (required) type attribute instead:
<script type="text/javascript">
<--!This is complete nonsense on two levels:
A correct opening SGML comment delimiter is written <!--. Correcting that should allow the script to run.
"Hiding" script and stylesheet content in this manner is as outdated as the language attribute. Stop doing it.
Mike
[1] JavaScript if you're refering to Netscape's implementation of ECMAScript, specifically.
purpledog
01-01-2005, 09:03 PM
Well just FYI:
the script should be in the head or the body tag. Putting it in between would certainly cause a problem. Head tag is preferred but I know a lot of scripts that will work just fine in the body too.
nadzD
01-01-2005, 11:41 PM
Thanx for your help but this still doesn't work?!?:
<HTML>
<HEAD>
<script type="text/javascript">
<!--
alert("Welcome to my website!")
//-->
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
purpledog
01-02-2005, 01:49 AM
Works for me!
Do you have a popup blocker ?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<script type="text/javascript">
<!--
alert("Welcome to my website!")
//-->
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
nadzD
01-03-2005, 11:12 PM
Don't worry i changed web hosts and its fine now :o i think that friendpages.com wouldn't allow the use of javascripts!! :rolleyes: im so silly!! thank 4 ur help n e way!!
What web host are u using now. Just curious.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.