SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member achilleas's Avatar
    Join Date
    Jun 2004
    Location
    Paphos
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript import problem

    I am trying to import an external ".js" file in my html code. I am using the following code:

    Code:
    <head>
    <title>AL.SO. (Alexis Socratous) I.C.S.</title>
    <link rel="stylesheet" href="css/core.css" type="text/css" title="also-main" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7" />
    <script src="functions.js"></script>
    </head>
    
    (Above is the head section)
    This is functions.js :

    Code:
    // Open new registration window
    function registerNew() { 
    window.open('register.html','Register','width=600,height=500,resizable=yes,scrollbars=yes'); 
    } 
    
    // Open new support window
    function support() {
    window.open('php/support.php', 'Technical Support','width=600,height=500,resizable=yes,scrollbars=yes'); 
    }
    
    //Open new help window
    function help() {
    window.open('help.html','Help,''width=600,height=500,resizable=yes,scrollbars=yes'); 
    }
    I get an error when i try to use the functions above. The error is:

    "Object Expected" Line: 1 Char:1 Code:0

    If I put the functions directly in my code, then the code works as it is supposed to work.

  2. #2
    SitePoint Member achilleas's Avatar
    Join Date
    Jun 2004
    Location
    Paphos
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry found the prob!


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
  •