SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru
    Join Date
    Jan 2005
    Location
    USA
    Posts
    633
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript does not execute

    Hi Guys

    Any reason why some of my Javascript, especially the ones that
    take arguments donot execute all of a sudden in all my broswers.

    It used to work now it does not.Especially ones that are started using
    onclick..

    Any thoughts please

    DD

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,449
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Have you tested in the javascript console in firefox? If there is an error it will tell you what it is.

  3. #3
    SitePoint Guru
    Join Date
    Jan 2005
    Location
    USA
    Posts
    633
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    Here is my javascript

    Code:
    <SCRIPT language=JavaScript>
    <!-- Begin
    function expandingWindow(website) {
    var windowprops='width=100,height=100,scrollbars=yes,status=0,resizable=0'
    var heightspeed = 10; // vertical scrolling speed (higher = slower)
    var widthspeed = 10;  // horizontal scrolling speed (higher = slower)
    var leftdist = 10;    // distance to left edge of window
    var topdist = 10;     // distance to top edge of window
    
    if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
    var winwidth = 800;
    var winheight = 600;
    var sizer = new Object(                                                               );
    for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
    sizer.resizeTo("1", sizeheight);
    for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
    sizer.resizeTo(sizewidth, sizeheight);
    sizer.location = website;
    }
    else
    new Object(                   );
    }
    //  End -->
    </SCRIPT>
    The bold line is the one that the console says has an error "sizer.resizeTo is not a function"

    Here is how I call the function

    Code:
    <input type="button" name="e_mail" value="  Customer / Agent Report " size="25" style="font-family: Arial; font-size: 10pt; color: #007C4C; border: 1 solid #007C4C ;font-weight:bold;background-color:#D6DF94" onClick="expandingWindow('doCustomerAgent.php')">
    Please help
    DD

  4. #4
    SitePoint Evangelist
    Join Date
    Mar 2005
    Posts
    523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did the window open before .

    ------
    Nivashni

  5. #5
    SitePoint Member
    Join Date
    Oct 2005
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Might be your internet settings

    Kelly


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
  •