Hello all,
I am making a html application. I have gotten rid of the caption bar and all and made my own, my question is i have to go WindowGUI.drag.mops when i should be able to use this.mops. I have posted my code below, And help is greatly appreciated.
[CODE]
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta content=”text/html; charset=utf-8″ http-equiv=”Content-Type” />
<title>Untitled 1</title>
<hta:application
id=”oHTA”
applicationname=”menu”
caption=”no”
border=”thin”
innerborder=”no”
scroll=”no” />
<script type=”text/javascript”>
var WindowGUI = {
drag: {
dragging: false,
init: (function(id)
{
var elm = document.getElementById(id);
elm.onmousedown = this.start;
elm.onmousemove = this.move;
elm.onmouseup = this.stop;
}),
mops: { negX: 0, negY: 0 },
start: (function()
{
this.dragging = true;
this.mops.negX = event.clientX;
this.mops.negY = event.clientY;
}),
stop: (function()
{
this.dragging = false;
this.mops.negX = 0;
this.mops.negY = 0;
}),
move: (function()
{
if (this.dragging)
{
var sX = event.screenX;
var sY = event.screenY;
moveTo(sX – this.mops.negX, sY – this.mops.negY);
}
})
}
};
window.onload = (function()
{
WindowGUI.drag.init(“title”);
});
</script>
<style type=”text/css”>
body
{
margin: 0px;
}
</style>
</head>
<body>
<div style=”height: 29px; background-color: #000000;” id=”title”> </div>
</body>
</html>