View Full Version : Prevent showing "Object" boarder line
edikaufmann
08-03-2006, 02:26 PM
thanks for your time,
when moving with the mouse over these "Objects" a dotted boarder line shows according to the position and size in the "style= ... " information.
When clicking once within this area all is ok i.e. the next time I move into it - the boarder line is NOT shown anymore.
??? What can / do I need to do to NOT show the boarder line in the first place ?
The routine rotates the text "Objects" (id=VAR, id=Provence) on the screen within the given area:
Sub Window_Onload()
text.Item("Action1").AT 1.00, "VAR.Rotate(2,4,5)", -1, 0.3
text.Item("Action1").AT 1.50, "Provence.Rotate(2,4,5)", -1, 0.25
text.Item("Action1").Play
End Sub
<OBJECT id="text" style="Z-INDEX: 105; LEFT: 16px; WIDTH: 16px; POSITION: absolute; TOP: 16px; HEIGHT: 8px"
classid="clsid:B0A6BAE2-AAF0-11D0-A152-00A0C908DB96">
</OBJECT>
<OBJECT id="VAR" style="Z-INDEX: 106; LEFT: 25px; WIDTH: 330px; POSITION: absolute; TOP: 5%; HEIGHT: 330px"
classid="clsid:369303C2-D7AC-11D0-89D5-00A0C90833E6" >
<PARAM NAME="SourceURL" VALUE="">
<PARAM NAME="CoordinateSystem" VALUE="0">
<PARAM NAME="HighQuality" VALUE="0">
<PARAM NAME="PreserveAspectRatio" VALUE="-1">
<PARAM NAME="Line0001" VALUE="SetLineStyle(1,0)">
<PARAM NAME="Line0002" VALUE="SetLineColor(0,0,255)">
<PARAM NAME="Line0003" VALUE="SetFillStyle(2)">
<PARAM NAME="Line0004" VALUE="SetFont('Bertram',30,30,0,0,0)">
<PARAM NAME="Line0005" VALUE="Text('CENTRE VAR',0,0)">
<PARAM NAME="Line0006" VALUE="SetFillColor(0,90,200,0,90,200)">
<PARAM NAME="Line0007" VALUE="SetHatchFill(1)">
</OBJECT>
<OBJECT id="Provence" style="Z-INDEX: 107; LEFT: 160px; WIDTH: 550px; POSITION: absolute; TOP: 20%; HEIGHT: 550px"
classid="clsid:369303C2-D7AC-11D0-89D5-00A0C90833E6" >
<PARAM NAME="SourceURL" VALUE="">
<PARAM NAME="CoordinateSystem" VALUE="0">
<PARAM NAME="HighQuality" VALUE="0">
<PARAM NAME="PreserveAspectRatio" VALUE="-1">
<PARAM NAME="Line0001" VALUE="SetLineStyle(1,0)">
<PARAM NAME="Line0002" VALUE="SetLineColor(0,255,0)">
<PARAM NAME="Line0003" VALUE="SetFillStyle(0)">
<PARAM NAME="Line0004" VALUE="SetFont('Verdona',30,30,0,0,0)">
<PARAM NAME="Line0005" VALUE="Text('LA PROVENCE VERTE',0,0)">
<PARAM NAME="Line0006" VALUE="SetFillColor(0,90,200,0,90,200)">
<PARAM NAME="Line0007" VALUE="SetHatchFill(1)">
</OBJECT>
jscheuer1
08-04-2006, 06:30 AM
This didn't use to be the case. It is due to a new 'security' feature in some browsers (Opera and IE only, as far as I know). I've not seen anyway around it for Opera as of yet. In IE, there are various ways of fooling the browser into not doing this. One is to use an external script that rewrites the object. A popular 'fix' for this in IE is an external script like so:
function fixObjs() {
var theObjs=document.getElementsByTagName('object');
for (var i_tem = 0; i_tem < theObjs.length; i_tem++)
theObjs[i_tem].outerHTML=theObjs[i_tem].outerHTML;
}
if ( typeof window.attachEvent != "undefined" )
window.attachEvent( "onload", fixObjs );
Save the above code to a file named fixObjs.js and try it out in IE on this example page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Fix Objects in IE - Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" src="fixObjs.js"></script>
</head>
<body>
<OBJECT id="VAR" style="Z-INDEX: 106; LEFT: 25px; WIDTH: 330px; POSITION: absolute; TOP: 5%; HEIGHT: 330px"
classid="clsid:369303C2-D7AC-11D0-89D5-00A0C90833E6" >
<PARAM NAME="SourceURL" VALUE="">
<PARAM NAME="CoordinateSystem" VALUE="0">
<PARAM NAME="HighQuality" VALUE="0">
<PARAM NAME="PreserveAspectRatio" VALUE="-1">
<PARAM NAME="Line0001" VALUE="SetLineStyle(1,0)">
<PARAM NAME="Line0002" VALUE="SetLineColor(0,0,255)">
<PARAM NAME="Line0003" VALUE="SetFillStyle(2)">
<PARAM NAME="Line0004" VALUE="SetFont('Bertram',30,30,0,0,0)">
<PARAM NAME="Line0005" VALUE="Text('CENTRE VAR',0,0)">
<PARAM NAME="Line0006" VALUE="SetFillColor(0,90,200,0,90,200)">
<PARAM NAME="Line0007" VALUE="SetHatchFill(1)">
</OBJECT>
</body>
</html>
All solutions to this in IE involve external scripts.
edikaufmann
08-04-2006, 03:52 PM
Thanks, the frame is now eliminated, HOWEVER:
the text is now NOT rotating anymore!
I don't yet see the reason - i.e. below routine should do it.
Any hint, thank you ed
<SCRIPT language="VBScript">
Sub Window_Onload()
text.Item("Action1").AT 1.00, "VAR.Rotate(2,4,5)", -1, 0.3
text.Item("Action1").AT 1.50, "Provence.Rotate(2,4,5)", -1, 0.25
text.Item("Action1").Play
End Sub
</SCRIPT>
jscheuer1
08-04-2006, 06:35 PM
Oh dear, VBscript! I had never seen the object tag used in that manner before, now I guess I know why. That probably isn't the main issue here though.
The problem with this method of removing the 'box' (activation) security feature is that sometimes this disables some of your parameter settings for the object. But, did you try the solution with your full code? My example only used one of your objects.
Through a lucky accident, I found that this did not happen with a quickTime (tm) object if I wrote the tag using an external javascript and prefaced it with an invalid image tag. I have no idea why this worked or if t would extend to other types of objects. Here is the code I used in my external script:
function writeObject(id){
var theHTML=''
if (document.body.filters)
theHTML+='<img'
theHTML+='<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="160"HEIGHT="120" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab"><PARAM name="SRC" VALUE="bluesstroll_03.mov"><PARAM name="AUTOPLAY" VALUE="true"><PARAM name="CONTROLLER" VALUE="false"><EMBED SRC="bluesstroll_03.mov" WIDTH="160" HEIGHT="136" AUTOPLAY="false" CONTROLLER="true" PLUGINSPAGE="http://www.apple.com/quicktime/download/"></EMBED></OBJECT>'
if (document.body.filters)
theHTML+='<font style="position:absolute;top:-15px;left:0;width:160px;height:16px;text-align:center;font:10px sans-serif;z-index:1000;background-color:#0d0d0d;cursor:default;"><a href="http://www.mediadogfilms.com/" target="_blank" style="color:white;text-decoration:none;" title="Courtesy MediaDog Films">Blues Stroll Video</a><b style="position:absolute;top:1px;right:0;border:1px solid #fff;font-size:7px;padding:1px;cursor:pointer;" title="Close" onclick="video();">X</b></font>'
else
theHTML+='<font style="display:block;position:absolute;top:-1.4em;width:160px;height:1.4em;text-align:center;font:11px sans-serif;z-index:1000;background-color:#202020;line-height:140%;cursor:default;"><a href="http://www.mediadogfilms.com/" target="_blank" style="color:white;text-decoration:none;" title="Courtesy MediaDog Films">Blues Stroll Video</a><b style="position:absolute;top:-1px;right:0;border:1px solid #fff;font-size:7px;padding:1px;cursor:pointer;line-height:100%;" title="Close" onclick="video();">X</b></font>'
document.getElementById(id).innerHTML=theHTML
}
There are a number of things in the above code that are non-standard (formating tricks) and also code for other browsers (in your case you need not worry about those, VBscript is IE only). Which brings me to another point with your code, since it is IE only, you might want to consider another method of getting the same effect that would work in more browsers. What do all your objects do? Could you supply a link to a working demo? One with the security activation box would be fine for these purposes.
Anyways, to try this accidental solution with your objects, use this external script:
function writeObject(id){
if (!document.body.filters)
return;
var theHTML=''
theHTML+='<img'
theHTML+='<OBJECT id="text" style="Z-INDEX: 105; LEFT: 16px; WIDTH: 16px; POSITION: absolute; TOP: 16px; HEIGHT: 8px"classid="clsid:B0A6BAE2-AAF0-11D0-A152-00A0C908DB96"></OBJECT><OBJECT id="VAR" style="Z-INDEX: 106; LEFT: 25px; WIDTH: 330px; POSITION: absolute; TOP: 5%; HEIGHT: 330px"classid="clsid:369303C2-D7AC-11D0-89D5-00A0C90833E6" ><PARAM NAME="SourceURL" VALUE=""><PARAM NAME="CoordinateSystem" VALUE="0"><PARAM NAME="HighQuality" VALUE="0"><PARAM NAME="PreserveAspectRatio" VALUE="-1"><PARAM NAME="Line0001" VALUE="SetLineStyle(1,0)"><PARAM NAME="Line0002" VALUE="SetLineColor(0,0,255)"><PARAM NAME="Line0003" VALUE="SetFillStyle(2)"><PARAM NAME="Line0004" VALUE="SetFont(\'Bertram\',30,30,0,0,0)"><PARAM NAME="Line0005" VALUE="Text(\'CENTRE VAR\',0,0)"><PARAM NAME="Line0006" VALUE="SetFillColor(0,90,200,0,90,200)"><PARAM NAME="Line0007" VALUE="SetHatchFill(1)"></OBJECT><OBJECT id="Provence" style="Z-INDEX: 107; LEFT: 160px; WIDTH: 550px; POSITION: absolute; TOP: 20%; HEIGHT: 550px"classid="clsid:369303C2-D7AC-11D0-89D5-00A0C90833E6" ><PARAM NAME="SourceURL" VALUE=""><PARAM NAME="CoordinateSystem" VALUE="0"><PARAM NAME="HighQuality" VALUE="0"><PARAM NAME="PreserveAspectRatio" VALUE="-1"><PARAM NAME="Line0001" VALUE="SetLineStyle(1,0)"><PARAM NAME="Line0002" VALUE="SetLineColor(0,255,0)"><PARAM NAME="Line0003" VALUE="SetFillStyle(0)"><PARAM NAME="Line0004" VALUE="SetFont(\'Verdona\',30,30,0,0,0)"><PARAM NAME="Line0005" VALUE="Text(\'LA PROVENCE VERTE\',0,0)"><PARAM NAME="Line0006" VALUE="SetFillColor(0,90,200,0,90,200)"><PARAM NAME="Line0007" VALUE="SetHatchFill(1)"></OBJECT>'
document.getElementById(id).innerHTML=theHTML
}
Save the above as objects.js and link it to the head using:
<script type="text/javascript" src="objects.js"></script>
Call it like so in the body of your page:
<div id="theObjs"></div>
<script type="text/javascript">
writeObject('theObjs');
</script>
This is to be used instead of the previous method I outlined and I have no idea if it will work with your code or not. You will also need to have your VBscript on the page in an appropriate location, probably after all this.
Still a better method would be to find, as I say, a more cross browser solution to the the effect in the first place as, this also may make avoiding the security feature unnecessary or easier to deal with.
edikaufmann
08-08-2006, 09:24 AM
John, thanks a lot for your thoughts!
O dear ..... VBscript!
after experimenting for some time with your provided idea/code I finally gave up and was looking for another solution which I already found using
a combination of the DynamicDrive 'Carousel' and 'Bouncy Message' - where I have the Problem to run them simultaneously! But I will open a new thread.
Thanks again, However, I think even your clever idea is, in the long term, not a clean solution .....
regards ed
jscheuer1
08-08-2006, 02:09 PM
Yes, I think I mentioned that I found this 'solution' by accident and wasn't sure if it would work with your code. It worked with a quickTime(tm) object. All browsers other than IE needed to be shielded from it, not an issue in your case with your already IE only code. Anyways, your other script solution sounds very promising and I have just come from your new thread where I provided a solution to the conflict that is time proven and that is valid code. Good luck with your site!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.