Toon posts:

Met cursor scrollen in popup.

Pagina: 1
Acties:

Verwijderd

Topicstarter
Beste forumers, ik heb onderstaande code (gedeelte althans)

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function thumbWindow(mypage, myname, w, h,fit_to_screen, imgtoolbar) {
    var props = '';
    var orig_w = w;
    var scroll = '';
    var winl = (screen.availWidth - w) / 2;
    var wint = (screen.availHeight - h) / 2;
    if (winl < 0) { winl = 0; w = screen.availWidth -6; scroll = 1;}
    if (wint < 0) { wint = 0; h = screen.availHeight - 32; scroll = 1;}
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'
    win = window.open('', 'myThumb', winprops)
    win.document.open();
    win.document.write('<html><head>');
    if (imgtoolbar==0) { win.document.write('<meta http-equiv="imagetoolbar" content="false" />'); }
    
    
win.document.write('<script language="JavaScript" src="http://www.website.nl/move.js" type="text/javascript"></script>');


    win.document.write('<title>'+myname+'</title></head>');
    win.document.write('<body style="cursor:move" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="window.close()">');


Dit werkt wel in Firefox maar IE loopt vast, natuurlijk doe ik het fout ben niet echt goed in Javasript vandaar hulp gevraagd.

Dan nog even de code die ik wil includen (als link move.js)

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
document.onmousedown = function(){
  var e=arguments[0]||event;
  var x=document.body.scrollLeft+e.clientX;
  var y=document.body.scrollTop+e.clientY;
  document.onmousemove=function(){
    scrollTo(x-e.clientX, y-e.clientY);
    return false;
  }
  document.onmouseup=function(){
    document.onmousemove=null;
  }
  return false;
}


Iemand een oplossing (overigens is het bedoeld op een foto in een popup met je muis te kunnen scrollen in de popup ipv met scrollbalken)

[ Voor 13% gewijzigd door Verwijderd op 30-07-2005 15:30 ]