Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

ydn-javascript · Yahoo! User Interface Library Group

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 12937
  • Category: JavaScript
  • Founded: Dec 15, 2005
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Q Regarding Drag and Drop   Topic List   < Prev Topic  |  Next Topic >
Summarize Messages Sort by Date  
#734 From: "preetha_a" <preetha_a@...>
Date: Mon Apr 3, 2006 5:46 pm
Subject: Q Regarding Drag and Drop
preetha_a
Send Email Send Email
 
Hi,
This is with a very simple example using the java.util.DD. I am trying
to override the startDrag method and I get the error "dragElementDD
has no properties".

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!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 http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1" />
<script type="text/javascript" src="js/YAHOO.js"></script>

<script type="text/javascript" src="js/event.js"></script>
<script type="text/javascript" src="js/dom.js"></script>
<script type="text/javascript" src="js/dragdrop.js"></script>

<script type="text/javascript" language="Javascript">
// global variables
var dragElementDD;
var dragElementDDProxy;

function init() {
dragElementDD = new YAHOO.util.DD("dragDropDivDD");
dragElementDDProxy = new YAHOO.util.DDProxy("dragDropDivDDProxy");
}
YAHOO.util.Event.addListener(window, 'load', init);
</script>
<style type="text/css">
.dragDiv {
position: relative;
width: 50px;
height: 50px;
background-color: #00FF00;
cursor: move;
}
</style>
</head>

<body>

<div style="height:20px"> </div>

<div id="dragDropDivDD" class="dragDiv">
Drag Drop 1
</div>
<br/>

<div id="dragDropDivDDProxy" class="dragDiv">
Drag Drop 2
</div>
<script type="text/javascript" language="Javascript">
dragElementDD.startDrag = function(x, y) {
alert("drag started at"+x+" "+y);
};
</script>

</body>

Is there something basic that is going wrong here?






 
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help