#1
  1. PHP Newbie forever
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    France
    Posts
    58
    Rep Power
    12

    JavaScript Problems


    I am trying to use 2 javascript functions, i have declared them in the header, and they are called by a text link, if you have one its function its fine, but 2 causes errors can you help

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function popWin(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=250,height=290,left = 312,top = 184');");
    // -->
    </SCRIPT>

    <SCRIPT>
    <!--
    function popWin2(URL) {
    day= new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=250,height=290,left = 312,top = 184');");//-->
    }

    </SCRIPT>
    -----------------------------------
    Php and MySql N3wbie forever.................
    -----------------------------------
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    NJ, USA
    Posts
    91
    Rep Power
    12

    Re: JavaScript Problems


    What your curly brackets.

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function popWin(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=250,height=290,left = 312,top = 184');");
    } *Added This*
    // -->
    </SCRIPT>

    <SCRIPT>
    <!--
    function popWin2(URL) {
    day= new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=250,height=290,left = 312,top = 184');");
    }
    //-->
    *Switched These*


    </SCRIPT>
    - Walt

    Will code for food.
  4. #3
  5. PHP Newbie forever
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    France
    Posts
    58
    Rep Power
    12
    thanks, i managed to find the problem, also ended up using the one function and taking in more than the URL address.
    -ali
    -----------------------------------
    Php and MySql N3wbie forever.................
    -----------------------------------

IMN logo majestic logo threadwatch logo seochat tools logo