Kor
11-23-2004, 12:53 PM
Ok I'll put here the solution we've both found it following a messenger discution (Shanti will probably insert it in the forum he also asked for help)
The method is object.removeAttribute()
The event is ondragend
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<script language="JavaScript" type="text/JavaScript">
function resize(){
var oImg= top.frames['ifr'].document.getElementById('ima');
if(oImg != null){
oImg.removeAttribute('height');
oImg.removeAttribute('width');
}
}
onload = function(){top.frames['ifr'].document.designMode = 'On';}
</script>
</head>
<body>
<img src=http://www.codingforums.com/archive/index.php/"00.jpg" width="50" height="50" id="ima" ondragend="resize()"><br>
<iframe name="ifr" id="ifr" src=http://www.codingforums.com/archive/index.php/"new.html"></iframe>
</body>
</html>
The method is object.removeAttribute()
The event is ondragend
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<script language="JavaScript" type="text/JavaScript">
function resize(){
var oImg= top.frames['ifr'].document.getElementById('ima');
if(oImg != null){
oImg.removeAttribute('height');
oImg.removeAttribute('width');
}
}
onload = function(){top.frames['ifr'].document.designMode = 'On';}
</script>
</head>
<body>
<img src=http://www.codingforums.com/archive/index.php/"00.jpg" width="50" height="50" id="ima" ondragend="resize()"><br>
<iframe name="ifr" id="ifr" src=http://www.codingforums.com/archive/index.php/"new.html"></iframe>
</body>
</html>
