Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Disable Drag and Drop in Internet Explorer?

Posted on 2004-09-14
5
Medium Priority
?
726 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
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…

650 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