seynn2001
06-09-2004, 01:22 PM
Hi there ppl.
Here is my doubt!
Im building a web site, and i whanted to put an image in the main site, over evrything else, like, over text and over images, like the image was on a new layer and the web site was the primary layer, i guess u understand what i mean.
So far i only found scripts that make smiliar things, but not what i whant :(, like this one:
<script language="JavaScript1.2">
var dragapproved=false
var z,x,y
function move(){
if (event.button==1&&dragapproved){
z.style.pixelLeft=temp1+event.clientX-x
z.style.pixelTop=temp2+event.clientY-y
return false
}
}
function drags(){
if (!document.all)
return
if (event.srcElement.className=="drag"){
dragapproved=true
z=event.srcElement
temp1=z.style.pixelLeft
temp2=z.style.pixelTop
x=event.clientX
y=event.clientY
document.onmousemove=move
}
}
document.onmousedown=drags
document.onmouseup=new Function("dragapproved=false")
</script>
<img src="Image5.gif" class="drag">
That script does what i whant but with one thing that i dont whant, drag and drop.
I just whant to place the image were i whant, and leave it there. I dont whant ppl to drag it.
Because i whant to put a image in the middle-right side of the page, over text and other images, and just leave it there.
I also dont whant one that when u scroll the page it always stays there, stiky..no..
i whant it to be "part" of the page, just like if pasted it over the site, like when we are playing with a photo, when u ad a background image or so...
I guess u already know what i mean!
Can anyone help me out with this? What do i need to do to make this?
Thanx ppl
Here is my doubt!
Im building a web site, and i whanted to put an image in the main site, over evrything else, like, over text and over images, like the image was on a new layer and the web site was the primary layer, i guess u understand what i mean.
So far i only found scripts that make smiliar things, but not what i whant :(, like this one:
<script language="JavaScript1.2">
var dragapproved=false
var z,x,y
function move(){
if (event.button==1&&dragapproved){
z.style.pixelLeft=temp1+event.clientX-x
z.style.pixelTop=temp2+event.clientY-y
return false
}
}
function drags(){
if (!document.all)
return
if (event.srcElement.className=="drag"){
dragapproved=true
z=event.srcElement
temp1=z.style.pixelLeft
temp2=z.style.pixelTop
x=event.clientX
y=event.clientY
document.onmousemove=move
}
}
document.onmousedown=drags
document.onmouseup=new Function("dragapproved=false")
</script>
<img src="Image5.gif" class="drag">
That script does what i whant but with one thing that i dont whant, drag and drop.
I just whant to place the image were i whant, and leave it there. I dont whant ppl to drag it.
Because i whant to put a image in the middle-right side of the page, over text and other images, and just leave it there.
I also dont whant one that when u scroll the page it always stays there, stiky..no..
i whant it to be "part" of the page, just like if pasted it over the site, like when we are playing with a photo, when u ad a background image or so...
I guess u already know what i mean!
Can anyone help me out with this? What do i need to do to make this?
Thanx ppl