Javascript Problem

Discussion in 'Web Programming' started by Jdhp_Admin, Jun 29, 2007.

Javascript Problem
  1. Unread #1 - Jun 29, 2007 at 5:57 PM
  2. Jdhp_Admin
    Referrals:
    0

    Jdhp_Admin Guest

    Javascript Problem

    i started to get a wierd error. it gave me an invalid argument error in a place where there was no code. it used to work then POOF it started erroring.

    the JS Script:

    Code:
    <script language="JavaScript">
    function newWindow(mypage,myname,w,h,features) {
    if(screen.width){
    var winl = (screen.width-w)/2;
    var wint = (screen.height-h)/2;
    }else{winl = 0;wint =0;}
    if (winl < 0) winl = 0;
    if (wint < 0) wint = 0;
    var settings = 'height=' + h + ',';
    settings += 'width=' + w + ',';
    settings += 'top=' + wint + ',';
    settings += 'left=' + winl + ',';
    settings += features;
    win = window.open(mypage,myname,settings);
    win.window.focus();
    }
    </script>
    The Call Procedure:
    Code:
    <a href="javascript:newWindow('My URL Here','The Window Name',600,550,'scrollbars=1,resizable=1')">
     
  3. Unread #2 - Jul 18, 2007 at 9:56 PM
  4. dberg20
    Referrals:
    0

    dberg20 Guest

    Javascript Problem

    The code looks sloppy but it should work fine and I don't see any parsing errors, it is possible there was a conflicting code you may have placed if it randomly started bugging.
     
  5. Unread #3 - Nov 1, 2007 at 8:49 PM
  6. fahlyn
    Referrals:
    0

    fahlyn Guest

    Javascript Problem

    Did you get a resolution to your issue?
     
< Need a simple installation | HTML/VBScript Questions... >

Users viewing this thread
1 guest


 
 
Adblock breaks this site