The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 4 of 4

Thread: Expands to Right I need Expand to left

  1. #1

    Expands to Right I need Expand to left

    Here is the code I have. The image currently expands to the right. I need it to expand to the left on mouse over. Any help would be greatly appreciated.


    var expandCollapseIncrement = 30;
    var expandCollapseEveryMs = 5;
    var isExpanding = false;
    var isCollapsing = false;

    function expandFrame() {
    isCollapsing = false;
    isExpanding = true;
    setTimeout(doExpand, 250);
    }

    function doExpand() {
    try {
    if (!isExpanding) {
    return;
    }
    var fl = document.getElementById("adframe");
    var w = parseInt(fl.style.width);
    w += expandCollapseIncrement;
    if (w <= 500) {
    fl.style.width = w + "px";
    setTimeout(doExpand, expandCollapseEveryMs);
    } else {
    isExpanding = false;
    }
    } catch(e) {
    alert("Error expanding: " + e.description);
    }
    }

    function collapseFrame() {
    isExpanding = false;
    isCollapsing = true;
    doCollapse();
    }


    function doCollapse() {
    try {
    if (!isCollapsing) {
    return;
    }
    var fl = document.getElementById("adframe");
    var w = parseInt(fl.style.width);
    w -= expandCollapseIncrement;
    if (w >= 300) {
    fl.style.width = w + "px";
    setTimeout(doCollapse, expandCollapseEveryMs);
    } else {
    isCollapsing = false;
    }
    } catch(e) {
    alert("Error expanding: " + e.description);
    }
    }

    document.write("<table cellspacing=\"0\" cellpadding=\"0\"><tr><td><iframe id=\"adframe\" frameborder=\"0\" scrolling=\"no\" style=\"position: absolute; z-index: 9999; width: 300px; height:250px; background-color: #FFF; border: #000 1px solid;\" src=\"banner.html\" onMouseOver=\"expandFrame();\" onMouseOut=\"collapseFrame();\"></iframe><div style=\"width: 300px; height:250px; margin-left:200px; \"></div>");
    document.write("</td></tr></table>");

  2. #2
    The banner.html file currently just has this in it:

    <body style="margin: 0px;">
    <div id="body_c">
    <div id="banner" style="padding: 0px; margin: 0px;"></div>
    <img src="1000067.jpg">
    </div>


    </body>

  3. #3
    No ideas? I'm havin bad luck on these kirupa forums....

  4. #4
    Rock... you posted it in the wrong section... were punishing you for not posting in Client-Size the forums are clearly marked. Most questions are answered within 12 hours if posted in the right section.

    I'd figure i'd tell you before you think were all a bunch of cynical people.

    Join #kirupa | Click the under my Username | CL | Jeff

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012