Hi
this is scorpionz
The reason of this thread is that:
I am making a Drag Div by mouse, and showing its position to the browser in (x,y ) coordinates, like when user click the box and drag it to some other place, then it shows the position of that point, i have research on the Internet, visited many website, but unable to find the right solution, like i founfd some Drag div but not finding the location, or i have found one of the example, which is working fine in FireFox but not working fine in IE.
So these are the problems i am facing,

Any Response back to this will be higly appreciated
I will be Thankful to that person as well

Thanks and Regards
ScorpionZ

Post the *relevant* code which is not working; it's probably one of those browser incompatibility issue you are facing there which is very much solvable.

Well as far as that code is concern its little complicate to embed here

Can you please Provide some website address where this thing is already in running mode?
My desire actual Solution?

Thanks for your response

Regards
scorpionz

http://developer.yahoo.com/yui/examples/dragdrop/index.html

Considering reference to this Website
In fact there are so many examples like this.... U agree that?

I have visited many website...
But many problems occurs in Function, By applying that whole component to our application
It will some how Problem occurs in confliction of Funtion

If i want to that by scratch learning those techniques...., So Let me have it step by step to get to the end

Just considering this example in our thread

<html>
<head>

<script type="text/javascript">
</script>
</head>
<body>
<div style='border-width:1px;border-color:#C0C0C0;border-style: solid;background-color:#C0C0C0;width:540px;'>

X coordinate:<textarea id="mytextarea"> </textarea>

Y coordinate:<textarea id="mytextarea2"> </textarea>

</div>
&nbsp;
<div id="mydiv" onclick="get_id()" style='border-width:1px;border-color:#C0C0C0;border-style: solid;background-color:#C0C0C0;width:130px;'>
<a href="#" id="src" onclick="get_val()">ScorpionZ</a>
</div>

As you are already familiar with this sample
Now what to apply to drag this Div with href inside that and store its Coordiantes....
I want to do it with Simple Javascript but i found ambigous JS at many places, some time get difficult to understand, So if i move that , It show X coordinates at Text 1 and Y at Text 2

Hope I clear the scenario in Detail

Hoping for the Best Responses

Thanks and Regards
ScorpionZ

Hi,

I am also making a class in javascript to drag any div on the web page. But for cross-browser I am using one javascript file from YUI that is yahoo-dom-event.js. In this file there are many function to peform these task

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.