...

View Full Version : how to drag and down a text to a page?



guowei1000
06-21-2004, 03:39 AM
yo its me again :D wanna to ask if it is possible to make a page like a big input box for drag and down... If i click on a certain word can i drag it and drop it to another page then the other page will display the word? i only found this on the net....

<html>
<head>

<div id="theId"></div>

<style>
#divTarget {background-color:yellow; font-weight: bold}
</style>

<script>

function controlText(str)
{
alert(str)
}



function cancelEvent()
{
window.event.returnValue = false;
}

function drop()
{
alert("hmmmmm.......")
}

</script>
</head>

<body id="divTarget" ondragenter="cancelEvent()" ondragover="cancelEvent()" ondrop="drop(this)">Drop on me</div>

</body>
</html>


needless to say i'm a javascript moron and cant understand how to handle the elements and whatever u all call it :confused: any help will be greatly thanks and rewarded with lots of smilies icon :P

Willy Duitt
06-21-2004, 05:10 PM
You may be able to use the Range Object (http://www.pbwizard.com/Articles/Moz_Range_Object_Article.htm) to simulate something what you have described.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum