14. marts 2003 - 18:45
Der er
13 kommentarer og 1 løsning
sæt allowTransparency = true via script
Hvordan sætter jeg allowTransparency = true på en Iframe via et script?
Annonceindlæg fra Deloitte
14. marts 2003 - 19:00
#1
hele siden ser således ud :-) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><title>Start</title> <link rel="stylesheet" type="text/css" href="../style/styles.css"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> </head> <body> <script type="text/javascript"> ie6 = (navigator.appVersion.indexOf("MSIE 6") != -1) ? true : false; ns6 = (document.getElementById && !document.all) ? true : false; ns4 = (document.layers) ? true : false; ie5 = (!ie6 && document.getElementById && document.all) ? true : false; ie4 = (!ie5 && document.all) ? true : false; op = (navigator.appName == "Opera") ? true : false; if ((ie6 == true) || (ie5 == "true") || (ie4 == "true")){ document.write("<br>Du bruger en IE browser :-)") } </script> <center> <table style="width:700px;height:400px;background-image: url(../jpg-filer/basis.jpg);" border="1" cellpadding="0" cellspacing="0"> <tr> <td align="right" style="height:75px;"> </td> </tr> <tr> <td align="right" style="height:30px;"> <table style="width:495px;" align="right" border="0" cellpadding="0" cellspacing="0"><tr> <td><input type="button" style="width:75px" class="button" name="News" value="News" onmouseover="this.className = 'buttonHover';" onmouseout="this.className = 'button';" onclick="parent.frames['content'].location.href='Showdata?pageID=news'"></td> <td><input type="button" style="width:90px" class="button" name="Mrtlz" value="Mrtlz" onmouseover="this.className = 'buttonHover';" onmouseout="this.className = 'button';" onclick="parent.frames['content'].location.href='Showdata?pageID=mrtlz'"></td> <td><input type="button" style="width:100px" class="button" name="Credits" value="Credits" onmouseover="this.className = 'buttonHover';" onmouseout="this.className = 'button';" onclick="parent.frames['content'].location.href='Showdata?pageID=credit'"></td> <td><input type="button" style="width:100px" class="button" name="Contact" value="Contact" onmouseover="this.className = 'buttonHover';" onmouseout="this.className = 'button';" onclick="parent.frames['content'].location.href='Showdata?pageID=contact'"></td> <td><input type="button" style="width:130px" class="button" name="Community" value="Community" onmouseover="this.className = 'buttonHover';" onmouseout="this.className = 'button';" onclick="parent.frames['content'].location.href='Showdata?pageID=community'"></td> </tr></table> </td></tr> <tr><td style="vertical-align:top;height:250px;;"> <iframe name="content" src ="Showdata" frameborder="0" scrolling="auto" style="width:100%;height:100%"> </iframe> </td></tr> <tr><td style="height:45px;"></td></tr></table> </center> </body> </html>
14. marts 2003 - 19:20
#2
<script language="javascript"> function TransparencyOff() { parent.frames['content'].allowTransparency = false; } function TransparencyOn() { parent.frames['content'].allowTransparency = true; } </script> <INPUT TYPE="button" VALUE="Transparency Off" onclick="TransparencyOff()"> <INPUT TYPE="button" VALUE="Transparency On" onclick="TransparencyOn()"> Det burde være det :) -grunken
14. marts 2003 - 23:06
#3
hmmm det virker ikke :-(
14. marts 2003 - 23:07
#4
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><title>Start</title> <link rel="stylesheet" type="text/css" href="../style/styles.css"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> </head> <body> <script type="text/javascript"> ie6 = (navigator.appVersion.indexOf("MSIE 6") != -1) ? true : false; ns6 = (document.getElementById && !document.all) ? true : false; ns4 = (document.layers) ? true : false; ie5 = (!ie6 && document.getElementById && document.all) ? true : false; ie4 = (!ie5 && document.all) ? true : false; op = (navigator.appName == "Opera") ? true : false; if ((ie6 == true) || (ie5 == "true") || (ie4 == "true")){ parent.frames['content'].allowTransparency = true; document.write("<br>Du bruger en IE browser :-)"); } </script> <center> <table style="width:700px;height:400px;background-image: url(../jpg-filer/basis.jpg);" border="1" cellpadding="0" cellspacing="0"> <tr> <td align="right" style="height:75px;"> </td> </tr> <tr> <td align="right" style="height:30px;"> <table style="width:495px;" align="right" border="0" cellpadding="0" cellspacing="0"><tr> <td><input type="button" style="width:75px" class="button" name="News" value="News" onmouseover="this.className = 'buttonHover';" onmouseout="this.className = 'button';" onclick="parent.frames['content'].location.href='Showdata?pageID=news'"></td> <td><input type="button" style="width:90px" class="button" name="Mrtlz" value="Mrtlz" onmouseover="this.className = 'buttonHover';" onmouseout="this.className = 'button';" onclick="parent.frames['content'].location.href='Showdata?pageID=mrtlz'"></td> <td><input type="button" style="width:100px" class="button" name="Credits" value="Credits" onmouseover="this.className = 'buttonHover';" onmouseout="this.className = 'button';" onclick="parent.frames['content'].location.href='Showdata?pageID=credit'"></td> <td><input type="button" style="width:100px" class="button" name="Contact" value="Contact" onmouseover="this.className = 'buttonHover';" onmouseout="this.className = 'button';" onclick="parent.frames['content'].location.href='Showdata?pageID=contact'"></td> <td><input type="button" style="width:130px" class="button" name="Community" value="Community" onmouseover="this.className = 'buttonHover';" onmouseout="this.className = 'button';" onclick="parent.frames['content'].location.href='Showdata?pageID=community'"></td> </tr></table> </td></tr> <tr><td style="vertical-align:top;height:250px;;"> <iframe name="content" src ="Showdata" frameborder="0" scrolling="auto" style="width:100%;height:100%"> </iframe> </td></tr> <tr><td style="height:45px;"></td></tr></table> </center> </body> </html>
14. marts 2003 - 23:10
#5
parent.frames.content is null or not an objekt
14. marts 2003 - 23:25
#6
Du kører osse scriptet inden at du loader framen, så den går ikke :) ryk det her ned efter </iframen> :)
14. marts 2003 - 23:27
#7
upz Du kører osse scriptet inden at du loader framen, så den går ikke :) ryk det her ned efter </iframen> :) <script> parent.frames['content'].allowTransparency = true; </script> -grunken
14. marts 2003 - 23:29
#8
Sådan ikke. Det virker bare ikke <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><title>Start</title> <link rel="stylesheet" type="text/css" href="../style/styles.css"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> </head> <body> <center> <table style="width:700px;height:400px;background-image: url(../jpg-filer/basis.jpg);" border="1" cellpadding="0" cellspacing="0"> <tr> <td align="right" style="height:75px;"> </td> </tr> <tr> <td align="right" style="height:30px;"> <table style="width:495px;" border="0" cellpadding="0" cellspacing="0"><tr> <td><input type="button" style="width:75px" class="button" name="News" value="News" onmouseover="this.className = 'buttonHover';" onmouseout="this.className = 'button';" onclick="parent.frames['content'].location.href='Showdata?pageID=news'"></td> <td><input type="button" style="width:90px" class="button" name="Mrtlz" value="Mrtlz" onmouseover="this.className = 'buttonHover';" onmouseout="this.className = 'button';" onclick="parent.frames['content'].location.href='Showdata?pageID=mrtlz'"></td> <td><input type="button" style="width:100px" class="button" name="Credits" value="Credits" onmouseover="this.className = 'buttonHover';" onmouseout="this.className = 'button';" onclick="parent.frames['content'].location.href='Showdata?pageID=credit'"></td> <td><input type="button" style="width:100px" class="button" name="Contact" value="Contact" onmouseover="this.className = 'buttonHover';" onmouseout="this.className = 'button';" onclick="parent.frames['content'].location.href='Showdata?pageID=contact'"></td> <td><input type="button" style="width:130px" class="button" name="Community" value="Community" onmouseover="this.className = 'buttonHover';" onmouseout="this.className = 'button';" onclick="parent.frames['content'].location.href='Showdata?pageID=community'"></td> </tr></table> </td></tr> <tr><td style="vertical-align:top;height:250px;;"> <iframe name="content" src ="Showdata" frameborder="0" scrolling="auto" style="width:100%;height:100%"> </iframe> </td></tr> <tr><td style="height:45px;"></td></tr></table> </center> <script type="text/javascript"> ie6 = (navigator.appVersion.indexOf("MSIE 6") != -1) ? true : false; ns6 = (document.getElementById && !document.all) ? true : false; ns4 = (document.layers) ? true : false; ie5 = (!ie6 && document.getElementById && document.all) ? true : false; ie4 = (!ie5 && document.all) ? true : false; op = (navigator.appName == "Opera") ? true : false; if ((ie6 == true) || (ie5 == "true") || (ie4 == "true")){ parent.frames['content'].allowTransparency = true; document.write("<br>Du bruger en IE browser :-)"); } </script> </body> </html>
14. marts 2003 - 23:30
#9
14. marts 2003 - 23:38
#10
Det her virker :-) document.all.content.allowTransparency = true;
14. marts 2003 - 23:38
#11
det se skisme godt ud :)
14. marts 2003 - 23:39
#12
Tak
14. marts 2003 - 23:41
#13
Jeg har et totalt spooky problem når jeg prøver at køre det i Mozilla
15. marts 2003 - 08:07
#14
123
Vi tilbyder markedets bedste kurser inden for webudvikling