Post your newly made JavaScripts here!

Discussion in 'Software' started by JavaScriptDude, May 4, 2004.

  1. JavaScriptDude

    JavaScriptDude Private E-2

    I just made this javascript:

    Code:
    [size=2]<html>
    
    <head>
    
    <script type="text/javascript">
    
    <!--
    
    drag = 0;
    
    move = 0;
    
    function setDiv(dragger)
    
    {
    
    dragDiv = dragger;
    
    drag = 1;
    
    }
    
    function startdrag()
    
    {
    
    window.document.onmousedown = mouseDown;
    
    window.document.onmouseup = mouseUp;
    
    window.document.onmousemove = mouseMove;
    
    window.document.ondragstart = mouseEnd;
    
    }
    
    function mouseDown()
    
    {
    
    if (drag==1)
    
    {
    
    clickleft = window.event.x - parseInt(dragDiv.style.left);
    
    clicktop = window.event.y - parseInt(dragDiv.style.top);
    
    move = 1;
    
    }
    
    }
    
    function mouseEnd()
    
    {
    
    window.event.returnValue = false;
    
    }
    
    function mouseMove()
    
    {
    
    if (move==1)
    
    {
    
    dragDiv.style.left = window.event.x - clickleft;
    
    dragDiv.style.top = window.event.y - clicktop;
    
    }
    
    }
    
    function mouseUp()
    
    {
    
    move = 0
    
    }
    
    //-->
    
    </script>
    
    </head>
    
    <body onLoad="startdrag()">
    
    <div id="north" onMouseOver="setDiv(north)" style="cursor: move; position: absolute; left: 10; top: 35">
    
    <center><MARQUEE direction="right" loop="20" 
    
    width="75%"><!--PUT YOUR TEXT HERE!!-->This is a test</center> </MARQUEE>
    
    </div>
    
    <div id="south" onMouseOver="setDiv(south)" style="cursor: move; position: absolute; left: 10; top: 5">
    
    </div>
    
    <div id="east" onMouseOver="setDiv(east)" style="cursor: move; position: absolute; left: 10; top: 20">
    
    </div>
    
    <div id="west" onMouseOver="setDiv(west)" style="cursor: move; position: absolute; left: 10; top: 50">
    
    </div>
    
    </div>
    
    </body>
    
    </html>
    
    </MARQUEE>
    
    [/size]
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds