Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Dec 2002
    Location
    Boca Raton , Fl
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Having errors calling up these two external scripts

    Whats missing get Syntax error



    <head>
    <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
    <script type="text/javascript"language="JavaScript"
    src="pop.js"></script>
    <script type="text/javascript" language="JavaScript" src="pop_a.js"></script>
    <meta name="generator" content="Adobe GoLive 6">


    Script pop.js_a


    <script language="JavaScript">
    <!--
    function n_window(theurl)
    {
    // set the width and height
    var the_width=675;
    var the_height=575;
    // set window position
    var from_top=0;
    var from_left = screen.width / 2 - the_width / 2;
    // set other attributes
    var has_toolbar='yes';
    var has_location='yes';
    var has_directories='no';
    var has_status='no';
    var has_menubar='yes';
    var has_scrollbars='yes';
    var is_resizable='yes';
    // attributes put together
    var the_atts='width='+the_width+',height='+the_height+',top='+from_top+',screenY='+from_top+',left='+fro m_left+',screenX='+from_left;
    the_atts+=',toolbar='+has_toolbar+',location='+has_location+',directories='+has_directories+',status ='+has_status;
    the_atts+=',menubar='+has_menubar+',scrollbars='+has_scrollbars+',resizable='+is_resizable;
    // open window
    window.open(theurl,'',the_atts);
    }
    //-->
    </script>

    Script pop.js

    <script language="javascript">
    function openNewWindow(winURL,winWidth,winHeight,winConfig)
    {
    var mmConfig = '\
    width=' + winWidth + ',\
    height=' + winHeight + ',\
    left=' + (screen.width / 2 - winWidth / 2) + ',\
    ' + winConfig
    var mmWin = window.open(winURL,'',mmConfig);
    mmWin.focus();
    }
    </script>


    Thanks

    Don

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try removing the \ at the end of your strings in the Pop.js
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog

  • #3
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    If you put some codes into an external script, remove <script language="JavaScript"> and </script>. They are unecessary and may do harm.

    ...and, what event will start those scripts?
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

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