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 2 of 2
  1. #1
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts

    onselectstart problem?

    I have the following script...

    I'm running into one problem when I try to click and drag the lower right hand corner of boxes in IE....It's not dragging and resizing as it should (like in Firefox)...

    I assume it has something to do with the following code:

    Code:
    function resizeIt(id,event)
    {
        addFocus(id);
    
        pxWidth = divObj.offsetWidth;
        pxHeight = divObj.offsetHeight;
    
        if (event.pageX || event.pageY)
        {
            x = event.pageX;
            y = event.pageY;
        }
        else
        {
            x = event.clientX;
            y = event.clientY;
        }
    
        document.onmousemove = resizeIt2;
    
        // prevent text selection in IE
        document.onselectstart = function()
        {
            return false;
        };
    
        // prevent text selection (except IE)
        document.onmousedown = function()
        {
            if (typeof event.preventDefault != 'undefined')
                event.preventDefault();
        };
    }
    Not sure why this isn;t working...perhaps I need another event handler (other than onselectstart)?

    Thanks.
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #2
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,746
    Thanks
    18
    Thanked 155 Times in 146 Posts
    nevermind, the code in red should be:

    Code:
        // prevent drag event in IE
        document.ondragstart = function()
        {
            return false;
        };
    For those interested about IE's drag-and-drop events: http://www.webreference.com/programm...pt/dragdropie/
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!


  •  

    Posting Permissions

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