Op de MSDN site heb ik een script gevonden over de movable iframes.
Dat heb ik werkend via een httpserver maar het script zou 'snap to grid' en 'force horizontal or vertical scrolling' moeten ondersteunen.
Bovenaan in de html file moet het volgende staan
http://msdn.microsoft.com.../inlinefloatingframes.asp
--> Klik op het blauwe knopje 'Show Me', in de source van de geopende pagina wordt winlessmovable.htc aangeroepen met:
Vervolgens heb ik (lekker copy+paste enzow <<--- Om te testen!
) dit gebruikt:
Als bij de server de content-types goed ingesteld staan (voor .htc op text/x-component) moet alles goed werken.
De eerste ** regels van winlessmovable.htc:
Je ziet bij de description bovenaan van de .htc file:
Ik zou dus in moeten kunnen stellen dat hij aan een grid wordt gekoppeld en ik zou moeten kunnen instellen dat hij alleen vertical of horizontal mag scrollen..
Zou iemand weten hoe ik dit moet doen?
Dat heb ik werkend via een httpserver maar het script zou 'snap to grid' en 'force horizontal or vertical scrolling' moeten ondersteunen.
Bovenaan in de html file moet het volgende staan
code:
1
| <HTML xmlns:move> |
http://msdn.microsoft.com.../inlinefloatingframes.asp
--> Klik op het blauwe knopje 'Show Me', in de source van de geopende pagina wordt winlessmovable.htc aangeroepen met:
code:
1
2
3
4
5
| @media all
{ move\:iframez {
position:absolute;
behavior: url(winlessmovable.htc);
} |
Vervolgens heb ik (lekker copy+paste enzow <<--- Om te testen!
code:
1
2
3
4
5
| <move:iframez id="square1" class="iframez" style="top:30; left:10; z-index:1;"> <iframe id="oIframe" src="pagina.htm" style="position:absolute; top:24; left:0; width:520; height:150; z-index:1 "> </iframe> </move:iframez> |
Als bij de server de content-types goed ingesteld staan (voor .htc op text/x-component) moet alles goed werken.
De eerste ** regels van winlessmovable.htc:
code:
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
| <!-- ---------------------------------------------------------------------
//
// Copyright 1999 Microsoft Corporation. All Rights Reserved.
//
// File: movable.htc
//
// Description: This behavior allows the web author to make page elements
// moveable via the mouse or through script. The movement can
// be limited to a set area, or to horizontal or vertical
// movement only.
//
//-------------------------------------------------------------------- -->
<PROPERTY NAME="movable" />
<PROPERTY NAME="direction" />
<PROPERTY NAME="snapable" />
<PROPERTY NAME="selectable" />
<METHOD NAME="moveTo" />
<METHOD NAME="snapToGrid" />
<EVENT NAME="ondrag" ID="drag" />
<EVENT NAME="ondragstart" ID="dragstart" />
<EVENT NAME="ondragend" ID="dragend" />
<EVENT NAME="onerror" ID="error" />
<ATTACH EVENT="onmouseup" HANDLER="DoMouseUp" />
<ATTACH EVENT="onmousedown" HANDLER="DoMouseDown" />
<ATTACH EVENT="onclick" HANDLER="DoSelect" />
<ATTACH EVENT="onselectstart" HANDLER="DoSelect" />
<ATTACH EVENT="ondocumentready" HANDLER="SetDefaults" />
<SCRIPT LANGUAGE="jscript">
//+----------------------------------------------------------------------------
//
// Global Variables
//
//-----------------------------------------------------------------------------
var iOffsetX; // On the dragstart event, this variable is
// set to track the difference between the
// mouse position and the corner of the
// element
var iOffsetY; // Same as iOffsetX, but for Y coordinate
var normZindex = style.zIndex; // Tracks the regular zIndex so it can be
// restored once the dragend event occurs
var zBound = new Array // Used for parsing the mvBoundary prop
('Top', 'Right', // into it's four component parts
'Bottom', 'Left'); |
Je ziet bij de description bovenaan van de .htc file:
code:
1
2
3
| // This behavior allows the web author to make page elements // moveable via the mouse or through script. The movement can // be limited to a set area, or to horizontal or vertical movement only. |
Ik zou dus in moeten kunnen stellen dat hij aan een grid wordt gekoppeld en ik zou moeten kunnen instellen dat hij alleen vertical of horizontal mag scrollen..
Zou iemand weten hoe ik dit moet doen?
[ Voor 20% gewijzigd door Cheater op 04-11-2003 14:49 ]