Archivlink: javarea.de Forum > JavaScript > Script läuft nicht unter Firefox.
Vollständigen Link anzeigen: javarea.de Forum > JavaScript > Script läuft nicht unter Firefox.

Pages: [1]

geschrieben von Oliver Pradetto am 09.08.2005 - 09:27
HTML-Quelltext
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: 
var dragswitch=0
var nsx
var nsy
var nstemp

function drag_dropns(name){
temp=eval(name)
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
temp.onmousedown=gons
temp.onmousemove=dragns
temp.onmouseup=stopns
}
function gons(e){
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
}
function dragns(e){
if (dragswitch==1){
temp.moveBy(e.x-nsx,e.y-nsy)
return false
}
}
function stopns(){
temp.releaseEvents(Event.MOUSEMOVE)
}
// drag drop function for IE 4+////
/////////////////////////////////

var dragapproved=false

function drag_dropie(){
if (dragapproved==true){
document.all.showimage.style.pixelLeft=tempx+event.clientX-iex
document.all.showimage.style.pixelTop=tempy+event.clientY-iey
return false
}
}
function initializedragie(){
iex=event.clientX
iey=event.clientY
tempx=showimage.style.pixelLeft
tempy=showimage.style.pixelTop
dragapproved=true
document.onmousemove=drag_dropie
}
if (document.all){
document.onmouseup=new Function("dragapproved=false")
}
//// drag drop functions end here//////
function hidebox(){
if (document.all)
showimage.style.visibility="hidden"
else if (document.layers)
document.showimage.visibility="hide"
}


Im Body befindet sich ein DIV-Container:
HTML-Quelltext
1: 
2: 
3: 
4: 
<div id="showimage" style="position:absolute;width:150px;left:150;top:50">
<layer width="100%" onMouseover="dragswitch=1;drag_dropns(showimage)" onMouseout="dragswitch=0">
	<img onMousedown="initializedragie()" style="cursor:hand" style="margin-left:0px ;margin-top:0px; vertical-align:bottom;" border="0" src="AVATAR/Bild.gif" id="avatar" name= "image" alt="Kay trinkt noch Kaffee" width="220" height="165"></layer></ilayer>
</div>


Wie muss ich das an Firefox anpassen?

Herzliche Grüße
Oliver

geschrieben von René am 09.08.2005 - 13:30
http://www.dhtmlcentral.com/script/.....asp?id=16

geschrieben von Oliver Pradetto am 16.08.2005 - 08:38
Das probiere ich mal aus. Danke für den Tipp !!



Powered by: JBB v.2.0.4 Copyright ©2000-2006, www.javarea.de.