IFrame causing problems loading scripts in IE7 (full code included)?
When I drag a link that is inside a drag-and-drop div over an iframe in IE7, I get very strange results. Try the below code and let me know if you have any suggestions to fix it.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<!--<script type="text/javascript" src="/js/prototype.js"></script>-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2/scriptaculous.js?load=effects,dragdrop,controls"></script>
<!--<script type="text/javascript" src="/js/scriptaculous.js?load=effects,dragdrop,controls"></script>-->
</head>
<body>
<div id="test" style="background-color: #aaaaaa; width: 200px; height: 50px;">
<a href="blah" onclick="blah(); return false;">blah</a>
</div>
<iframe>
</iframe>
</body>
<script>
function blah(){
//blackbird.debug("blah");
}
var dummy = new Draggable("test", {scroll:window,scrollSensitivity: 20,scrollSpeed: 25, revert: true, onStart: onDragStart, onEnd: onDragEnd });
var temp;
function onDragStart(drgObj,mouseEvent){
temp = mouseEvent.target.onclick;
mouseEvent.target.onclick = function(e){
mouseEvent.target.onclick = temp;
return false;
}
}
function onDragEnd(drgObj,mouseEvent){
}
</script>
</html>
0
source to share
3 answers
Well, I haven't been able to test your code. But I am working on an iframe also with draggable elements on top of the iframe.
I am having a problem with starteffect having problems with its opacity. the thing i did was starteffect: '' in my new Draggable js code and made a clean div with an iframe in there.
Here is a snippet of my code:
<div id="main_container">
<div>
<iframe></iframe>
</div>
<div id="youredragelelement"><img /></div>
</div>
for the full iframe page I came to this site and it works great for me: http://www.dev-explorer.com/articles/full-page-iframe
Hope it helps.
+1
Martijn
source
to share