/    Sign up×
Community /Pin to ProfileBookmark

HTA Window GUI Object

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”>&nbsp;</div>

</body>

</html>
[/CODE]

to post a comment
HTML

0Be the first to comment 😎

×

Success!

Help @monkee98 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...