Change position of layer.

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Change position of layer.

    Please, i need a script to with a click change position of layer.

    Anybody know ???



    João Cândido de Souza Neto Guest

  2. Similar Questions and Discussions

    1. Newbie need help in keeping the dragged layer in itscurrent position even after refresh
      Hi, guys. How do I keep the dragged layer in its current position in the page even when the page refreshes? I have this dynamic page that needs...
    2. DW8 messed my relative position layer behaviors
      I recently upgraded from MX to Studio 8. I have a website where I was using a series of "set text of layer" behaviors to write copy to a relative...
    3. How do you paste a layer in the exact position it was copied from? in a new project?
      How do you paste a layer in the exact position it was copied from? in a new project? basically If I copy something from a project and open a new...
    4. Change Ruler Position
      Hi, Is there a way to change where '0' begins on the rulers at the top and left of the document? At the moment it's set to start at -20cm at the...
    5. can NOT change the position of a WebUserControl on page
      Right-click on the page, and select properties. Change the layout to Grid. "Christian" <christian.cambier@pandora.be> wrote in message...
  3. #2

    Default Re: Change position of layer.

    Use the Change Property behavior, as you can see in the code below -

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_reloadPage(init) { //reloads the window if Nav4 resized
    if (init==true) with (navigator) {if
    ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
    onresize=MM_reloadPage; }}
    else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
    location.reload();
    }
    MM_reloadPage(true);

    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document;
    if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
    x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++)
    x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_changeProp(objName,x,theProp,theValue) { //v6.0
    var obj = MM_findObj(objName);
    if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
    eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
    }
    }
    //-->
    </script>
    </head>

    <body>
    <div id="Layer1" style="position:absolute; left:102px; top:128px;
    width:102px; height:68px; z-index:1; background-color: #FFFFCC;
    layer-background-color: #FFFFCC; border: 1px none #000000;"></div>
    <table width="300" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td bgcolor="#333333"></td>
    <td width="100%">&nbsp;</td>
    </tr>
    </table>
    <p><a href="#"
    onClick="MM_changeProp('Layer1','','style.left','3 50','DIV')">LINK</a></p>
    <p>&nbsp;</p>
    </body>
    </html>

    I manually entered the "style.left" property....

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver MX
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]news://forums.macromedia.com/macromedia.dreamweaver[/url] - THE BEST WAY TO GET
    ANSWERS
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "João Cândido de Souza Neto" <joao@mmteleinformatica.com.br> wrote in
    message news:brks76$4b$1@forums.macromedia.com...
    > Please, i need a script to with a click change position of layer.
    >
    > Anybody know ???
    >
    >
    >

    Murray *TMM* Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139