View Full Version : Draggable Div Trouble


vanillacokemeeh
02-19-2005, 07:53 AM
I have the code for draggable divs but for some reason it won't drag on XANGA. I tested it out on my geocities account and it works perfectly, anyone wanna help? here's the code I'm using in my tester xanga, you can also click that to see for yourself.

<style type=text/css>
div {
scrollbar-arrow-color: #666666;
scrollbar-track-color: #4A4A4A;
scrollbar-shadow-color: #919191;
scrollbar-face-color: #000000;
scrollbar-highlight-color: #919191;
scrollbar-darkshadow-color: #000000;
scrollbar-3dlight-color: #666666;
overflow-x: hidden;}

body {
scrollbar-arrow-color: #4A4A4A;
scrollbar-track-color: #000000;
scrollbar-shadow-color: #919191;
scrollbar-face-color: #000000;
scrollbar-highlight-color: #919191;
scrollbar-darkshadow-color: #000000;
scrollbar-3dlight-color: #666666;
overflow-x: hidden;}

body, html, .standard, .leftmodulefontcolor, p, td, tr, th, head, table, font, div, center, LI, UL, table.header TH, table.header TD {
font-family: tahoma;
color: #FFE5D9;
font-size: 7pt;
text-transform:lowercase;
line-height: 8pt;
cursor: crosshair;}

div.header{
font-family:arial;
color:#000000;
font-weight:bold;
text-transform:uppercase;
line-height: 8pt;
font-size: 8pt;
}
div.drag{
font-family:arial;
color:#000000;
line-height: 8pt;
font-size: 8pt;
}
i,{
font-family:arial;
color:#ffffff;
line-height: 8pt;
font-size: 8pt;
}
p, .blogbody {
font-family: tahoma;
color: #ffffff;
font-size: 7pt;
width: auto !important;
text-transform:none;
line-height: 8pt;
cursor: crosshair;
text-align:justify;
text-transform:lowercase;
padding: 0px
background: transparent
}

STRONG {
font-family: tahoma;
text-transform:lowercase;
font-weight:bold;
line-height: 10pt;
font-size: 7pt;
color: #FFE594;}

B {
font-family: tahoma;
text-transform:lowercase;
font-weight:bold;
line-height: 8pt;
font-size: 7pt;
color: #FFE594;
}

U {
font-family: tahoma;
border-bottom: 1px solid #ffffff;
color: #FFE594;
}

select, textarea, input {
color: #Ffffff;
font-family: tahoma;
background: 000000;
font-size: 7pt;
border: 1px #ffffff solid}

a:link, .footernav.link, a.footernav:link, a.footernav:active, a:visited, a.footernav:visited {
font-family:tahoma;
color: #ffffff;
text-transform:lowercase;
font-weight: none;
background-color:#4F4F4F;
letter-spacing:0px;
font-size: 7pt; }

a:hover {
font-family: tahoma;
background-color:#FFE594;
font-size: 7pt;
font-weight:bold;
text-transform:uppercase;
color: #ffffff;
letter-spacing:0px;
cursor: crosshair;
padding: 0px;
}

.blogheader {
width: auto !important;
text-align: left;
font-family: Times New Roman;
font-size: 16pt;
color: #ffffff;
background-color:#4A4A4A;
font-weight: bold;
text-transform:uppercase;
letter-spacing: -3px;
border-bottom: 2x #999999 solid;
}


hr{
color:#666666;
height:2px;
width: auto !important;
}
table.blogbody tr td {
width:0px;
padding-left:0px;
padding-right:0px;
padding-top: 0px;}
</style>

<style>
<!--
.drag{position:relative;cursor:hand}
-->
</style>
<script language="JavaScript1.2">
<!--

//Generic Drag Script- © Dynamic Drive (www.dynamicdrive.com)
//For full source code and terms of usage,
//visit http://www.dynamicdrive.com

var ie=document.all
var ns6=document.getElementById&&!document.all

var dragapproved=false
var z,x,y

function move(e){
if (dragapproved){
z.style.left=ns6? temp1+e.clientX-x: temp1+event.clientX-x
z.style.top=ns6? temp2+e.clientY-y : temp2+event.clientY-y
return false
}
}

function drags(e){
if (!ie&&!ns6)
return
var firedobj=ns6? e.target : event.srcElement
var topelement=ns6? "HTML" : "BODY"

while (firedobj.tagName!=topelement&&firedobj.className!="drag"){
firedobj=ns6? firedobj.parentNode : firedobj.parentElement
}

if (firedobj.className=="drag"){
dragapproved=true
z=firedobj
temp1=parseInt(z.style.left+0)
temp2=parseInt(z.style.top+0)
x=ns6? e.clientX: event.clientX
y=ns6? e.clientY: event.clientY
document.onmousemove=move
return false
}
}
document.onmousedown=drags
document.onmouseup=new Function("dragapproved=false")
//-->
</script>

<div id="Layer2" class="drag" style=" filter: alpha(opacity=50);background-color: #ffffff;position:absolute; left:20px; top:35px; width:195px; height:151px; z-index:2">

<div class="header">terminal one</div>hi!</div><Br>


<div id="Layer2" class="drag" style=" filter: alpha(opacity=50);background-color: #ffffff;position:absolute; left:50px; top:145px; width:195px; height:151px; z-index:2">

<div class="header">terminal two</div>hi!</div><Br>

tester (http://www.xanga.com/vanillacoke4meeh)

Cybunny100
02-19-2005, 08:08 AM
If it works well on Geocities have you tried using different interenets e.ct Mozella,opera internet elplorer

vanillacokemeeh
02-19-2005, 08:30 AM
what's the difference if it works on geocities?

Cybunny100
02-19-2005, 10:34 PM
Ok, Just asking I suggest maybe you should consider asking a moderator about your problems.

vanillacokemeeh
02-20-2005, 03:45 AM
that's why i posted this here...

tokyo bleu
02-20-2005, 03:56 AM
You do realise that most codes have to be rewritten to function on Xanga? I've never seen a draggable DIV on a Xanga before.

vanillacokemeeh
02-20-2005, 07:07 PM
I have seen PLENTY. Most of the examples I know already have changed their layouts. Look in the Web Sources section of www.cliquemb.com, this is where I got the code, the poster even said herself, it works she used it on her xanga. Well I guess I'll just ask the people there since no one seems to be able to help me here.