?
Solved

Disable Drag and Drop in Internet Explorer?

Posted on 2004-09-14
5
Medium Priority
?
724 Views
Last Modified: 2008-03-04
Hello,


Is it possible to disable Drag and Drop in IE for user when he surfs the web page?

E.g. So the user is unable to drag an Image from one frame to another.

If this is not possible by scripting, how do I achieve otherwise ?

Regards,

M PG
0
Comment
Question by:morpheous_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 33

Accepted Solution

by:
sajuks earned 150 total points
ID: 12052636
//try this,
<body onDragStart="return false">
<img name="img" src="http://experts-exchange.com/images/indexLogo.gif">
</body>
0
 

Author Comment

by:morpheous_
ID: 12053017
This works if I don'tuse the frames the way I do.

I have three frames in my frameset:

frameTop.aspx (frameTop)
n/a  (frameMain)
frameBottom.aspx (frameBottom)

frameMain is passed to frameset as attribute and doesn't exist form the start,except is created
from attributed (?href=pageurl.xml) passed from previous page.

this is the way frameset looks like:

<frameset rows="120,*,40" frameborder="NO" border="0" framespacing="0">
  <frame src="frameTop.aspx" name="frameTop" scrolling="no" noresize>
  <frame src='<%=Request.QueryString["frameMain"]%>' name="frameMain" scrolling="no" noresize>
  <frame src="frameBottom.aspx" name="frameBottom" scrolling="no" noresize>
 </frameset>


So, this way I am unable to set <body onDragStart="return false"> on the frame file that desn't exist.

Is there a way to do this somehow, shut down drag and drop on whole client / IE?


Thanx in advance!

Michael P G
0
 
LVL 33

Expert Comment

by:sajuks
ID: 12053416
try something like,
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
var obj;
var dragging = false;
var objx, objy;


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

//-->
</SCRIPT>
</HEAD>

<BODY>
<img ondragstart="cancelEvent()" src="http://experts-exchange.com/images/indexLogo.gif">
</BODY>
</HTML>

//http://bucarotechelp.com/design/97110430.asp
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question