Results 1 to 8 of 8

Thread: I Have one simple problem!

  1. #1
    Join Date
    Dec 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy I Have one simple problem!

    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.

  2. #2
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Try this:

    <HTML>
    <HEAD>
    </HEAD>
    <BODY>
    <SCRIPT LANGUAGE="JavaScript">
    <--!
    alert("Welcome to my website!")
    //-->
    </SCRIPT>
    </BODY>
    </HTML>

    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by nadzD
    Java Script
    Javascript[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 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:

    HTML Code:
    <script type="text/javascript">
    <--!
    This is complete nonsense on two levels:

    1. A correct opening SGML comment delimiter is written <!--. Correcting that should allow the script to run.
    2. "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.
    Last edited by mwinter; 01-02-2005 at 01:55 AM.

  4. #4
    Join Date
    Dec 2004
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  5. #5
    Join Date
    Dec 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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>

  6. #6
    Join Date
    Dec 2004
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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>
    Last edited by purpledog; 01-02-2005 at 01:52 AM.

  7. #7
    Join Date
    Dec 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thanx

    Don't worry i changed web hosts and its fine now i think that friendpages.com wouldn't allow the use of javascripts!! im so silly!! thank 4 ur help n e way!!

  8. #8
    Join Date
    Jan 2005
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    What web host are u using now. Just curious.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •