HTML - Resize Iframe Source
Hey all..
Is it possible to have the browser resize the src inside an iframe? I'm loading up a website in an iframe, and it's just a tad larger then what I have room for in my content area.. I know that I can restrict the size of the frame itself, but then I'm left with those nasty scroll bars.. Thanks David Similar Tutorialsi have used the iframe to locate the third party web site into my site, but i couldnt align the 3rd party's site as my wish. i.e:-If want to hide advertisements those are in the top margin on 3rd party, wat do i wanna do.i'm new to this. plz help me. thanks Hi, am trying to show a page in a HTML <iframe> but before loading that page I want to set a variable value. I tried following: <iframe src="slgrid/ccustomer.php?id=" <? echo $cat; ?> "width="100%" height="100""></iframe> but can not get the value of id using $_GET['id'] Any other ideas are also welcome please. I am a little new in PHP and HTML. Any help in this regard will be appreciated. Thanks and regards, Hi, So i need some help. I hope i post this at the right place. I'm making a website, and i want the iframe to have auto resize, because the first page is a news page, and will therefor end up being pretty long, i dont want a scroll bar inside the iframe because i dont like the way it looks. I found a javascript thing that helped with i resize, the iframe extends if the news page gets longer with the news i post. BUT. if i go to any other page on the website, the iframe keeps the first pages height, and i dont want that, i want it to "shrink" and be as long as the information inside the iframe. this is the website right now, far from done by the way. http://martin.scorpionshops.com/spwebsite/index.html and as you can see the height of the iframe stays the same if you klick on any of the links in the menu, is there a way to fix this? this is the code that ive applied to the iframe and such on the index page where the iframe is located <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" type="text/css" href="stylesheet.css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>SimplePlanWorldwide</title> </head> <body topmargin="0" link="black" vlink="black" alink="black"> <script language="JavaScript"> <!-- function autoResize(id){ var newheight; var newwidth; if(document.getElementById){ newheight=document.getElementById(id).contentWindow.document .body.scrollHeight; newwidth=document.getElementById(id).contentWindow.document .body.scrollWidth; } document.getElementById(id).height= (newheight) + "px"; document.getElementById(id).width= (newwidth) + "px"; } //--> </script> <div align="center"> <table width="1024" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="4" background="header.jpg" height="294" border="0"> </td> </tr> <tr> <td colspan="4" height="65" border="0"><img src="menu.jpg" border="0" usemap="#Map2"></img></td> </tr> <tr> <td width="227" height="108" background="welcome.jpg" border="0"><p><font size="1" face="arial narrow" vlink="black" hlink="black" color="#ffffff"><br> Welcome to SimplePlanWorldwide!<br> SimplePlanWorldwide.com is a fansite for Simple Plan <br> and we are here to give you the latest about the band<br> and feed your Simple Plan cravings. Enjoy!</font></p></td> <td width="196" height="108" background="sitestats.jpg" border="0"><font size="1" face="arial narrow" vlink="black" hlink="black" color="#ffffff" valign="left"><br> <B>Owner:</B> Matilda | About <br> <B>Launched:</b> 2012.30.05 <br> <b>Layout:</b> Version 1.0<br> <b>Like this site?</b> Bookmark us!</font></td> <td width="204" height="108" background="disclaimer.jpg" border="0"><p><font size="1" face="arial narrow" vlink="black" hlink="black" color="#ffffff"><br> SimplePlanWorldwide is not affiliated with the <br> band, Simple Plan, Pat, Frenchie, Atlantic Records</font><font size="1" face="arial narrow" vlink="black" hlink="black" color="#ffffff"><br> or Lava Records, and we don't know the guys<br> personally. We're just a fansite for SP.</font></p></td> <td><img src="linksofficial.jpg" width="397" height="108 border=" border="0" usemap="#Map"0"></td> </tr> </table> <table width="1024" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top" witdh="755" background="mainbackground.jpg" border="0" repeat="norepeat"><br> <center><iframe align="top" SRC="news.php" width="100%" height="200px" name="iframe1" id="iframe1" marginheight="0" frameborder="0" onLoad="autoResize('iframe1');"></iframe></center> </td> <td valign="top" width="269" background="sidebackground.jpg" border="0"> <div class="twitter"> <center><br> <script charset="utf-8" src="http://widgets.twimg.com/j/2/widget.js"></script> <script> new TWTR.Widget({ version: 2, type: 'list', rpp: 8, interval: 30000, title: '', subject: 'SIMPLE PLAN TWEETING', width: '250', height: 700, theme: { shell: { background: 'transparent', color: '#999999' }, tweets: { background: 'transparent', color: '#444444', links: '#000000' } }, features: { scrollbar: false, loop: false, live: true, behavior: 'all' } }).render().setList('matildawr', 'simple-plan').start(); </script> </div></td> </tr> </table> <map name="Map" id="Map"> <area shape="rect" coords="7,22,151,77" href="http://www.simpleplanfoundation.org" target="_blank" alt="map" /> <area shape="rect" coords="164,13,226,100" href="http://www.officialspcrew.com" target="_blank" alt="map" /> <area shape="rect" coords="236,23,388,82" href="http://www.merchdirect.com/simpleplan" target="_blank" alt="map" /> </map> <map name="Map2" id="Map2"> <area shape="rect" coords="86,6,148,42" href="news.php" target="iframe1" alt="menumap" /> <area shape="rect" coords="190,7,331,40" href="information.html" target="iframe1" alt="menumap" /> <area shape="rect" coords="372,7,434,40" href="tour.html" target="iframe1" alt="menumap" /> <area shape="rect" coords="610,6,738,41" href="multimedia.html" target="iframe1" alt="menumap" /> <area shape="rect" coords="772,5,833,38" href="www.html" target="iframe1" alt="menumap" /> <area shape="rect" coords="474,6,568,38" href="http://martin.scorpionshops.com/spwebsite/forum/" target="_blank" alt="gallerymap" /> </map> </body> </html> So.. do you have any ideas? I dont know much css or javascript, or php for the matter, but i am willing to learn to make it work, so ANY methods that will make this work, just help me I don't know if this question is posted somewhere, but I can't seem to find the answer I'm looking for. I'm currently using iframe for my posting entries, and I can't figure out the script for auto height. I'm tired of setting the height by hand, every time my entries starts to stretch. Now regarding the width, would that be possible too? if not, I'm not too concerned. Most important is the height. If anyone have the answers to this please reply. Thanks in advance! (: Hi, One of my files is calling an iframe inside a single table. The code looks like following iframe.htm ========================================================================== <html> <head> <title> New Document </title> </head> <body topmargin="0" leftmargin="0" style="overflow:auto"> <table cellpadding="0" cellspacing="0" height="100%" width="100%"> <tr> <td><iframe name="parent_iframe" src="frames.htm" frameborder="0" framespacing="0" height="100%" width="100%" scrolling="yes"></iframe></td> </tr> </table> </body> </html> ========================================================================== frames.htm has following code ========================================================================== <html> <head> <title>Denials Management System</title> </head> <frameset rows="50%,*" border="1" bordercolor="black" marginheight="0" marginwidth="0" framespacing="0"> <frame src="frame_top.htm" scrolling="yes" name="topFrame"> <frame src="frame_bottom.htm" scrolling="yes" name="bottomFrame"> </frameset> <body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"> </body> </html> ========================================================================== Everything works fine. The only problem is resize functionality doesn't work in 'frames.htm'. After trying few options, I have found that if I remove height attribute from table (height="100%") in 'iframe.htm', resize starts working. But, this shrinks the iframe vertically. I have tried all other options but nothing makes the resize working. I am facing this problem with IE7. It works perfect with Mozilla Firefox 2.0. IE7 doesn't produce any error but the resizing simply doesn't work. Can someone help me please ? Thanks in advance. Regards, Sandeep Hi, Is there eny way of hiding the source of my website If there is please reply. Thanks Hi everyone does anyone know whats up withe the new look view source up the page options .......I can't seem to edit or add to my html sources as I usually can? Thanks! http://www.planetcellinc.com Just the home page, if you could spare a minute to view the source. I would like to get some comments on the quality (or lack thereof) of this code. Any and all comments are appreciated. Thanks, Jeff hi, i've a very simple html page, where i have an iframe. The problem is that i want to add some text below the iframe. however, my text keeps showing up on the right hand side of the iframe. i've looked at the tutorials discussing the tags available for iframe, but surprisingly, none seem to relevant to this. Code: <html> <body> <table border="0" cellspacing="10"> <table border="0" cellpadding="0" cellspacing="0" align="left"> <td valign="top"> <iframe src="mySource.jsp" height="700" width="600" frameborder="0" scrolling="auto"></iframe> </td> </table> This should be displayed below the iframe but actually gets displayed on the right </body> </html> any help / guidance in this will be much appreciated. thanks in advance! I have 2 IFrames on a page. I am going to end up with a long list of shows to catch-up on. Is there a way I can embed an IFrame with the list, and when you click on a show, you it will change the Playing Show http://tiny.cc/catchup <---The page I am referring to. i created a password protected forum to mess around with, but I've learned that if you just hit View Source its pretty obvious that the <var password=...> will tell you the password. Now ik that you can do these crappy encodings that would slow down getting the password by about 2 minutes but is there anything out there that will actually STOP people from viewing the source code indefinately? P.S. My Code: HTML Code: <b><font color=red><font size=5>WINTER IS COMING: HENCE THE SNOWFLAKES</center></b> <html> <body background="http://thenetworkstation.net/custom/bg-long.jpg"> <font size=3> <head> <script language="javascript"> <!-- function PlanA() { var password = "1883" var pass = prompt("Please Enter The Password To Gain Access To The Site"," ") if (pass.toLowerCase() == password) { window.location = "http://hiddenforum.darkbb.com/correct-password-h3.htm"; } else { window.location = "http://hiddenforum.darkbb.com/wrong-password-h2.htm"; } } --> </script> </head> <body> <p><center> <marquee behavior=alternate width="250" scrollamount="7" scrolldelay="96" height="20" bgcolor="#E0FFFF"><font size="3">Welcome to the Hidden Forum </font></marquee> <font color="white"> The Password Changed Regularly So Be On Regularly To Be Notified Before A Change</center></p> <p><center>If You Get The Password Correct Then You Will Be Redirected To A Forum. <center><a href="#" onClick="PlanA(); return false">Click Here To Enter Password</a></center> <p><center>Please Take A Moment To Visit My Other Forum: <p><a href="http://www.tastymods.net/" target="_blank">TastyMods.net a Game Console Modding Forum</a></right> </body> <center><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/Ig74Ca-9zXQ?fs=1&%3Bhl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Ig74Ca-9zXQ?fs=1&%3Bhl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></center> </body> <!-- begin htmlcommentbox.com --> <div id="HCB_comment_box"><a href="http://www.htmlcommentbox.com">HTML Comment Box</a> is loading comments...</div> <link rel="stylesheet" type="text/css" href="http://www.htmlcommentbox.com/static/skins/simple/skin.css" /> <script type="text/javascript" language="javascript" id="hcb"> /*<!--*/ (function(){s=document.createElement("script");s.setAttribute("type","text/javascript");s.setAttribute("src", "http://www.htmlcommentbox.com/jread?page="+escape((typeof hcb_user !== "undefined" && hcb_user.PAGE)||(""+window.location)).replace("+","%2B")+"&opts=406&num=10");if (typeof s!="undefined") document.getElementsByTagName("head")[0].appendChild(s);})(); /*-->*/ </script> <!-- end htmlcommentbox.com --> <script> // Set the number of snowflakes (more than 30 - 40 not recommended) var snowmax=35 // Set the colors for the snow. Add as many colors as you like var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD") // Set the fonts, that create the snowflakes. Add as many fonts as you like var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS") // Set the letter that creates your snowflake (recommended:*) var snowletter="*" // Set the speed of sinking (recommended values range from 0.3 to 2) var sinkspeed=0.6 // Set the maximal-size of your snowflaxes var snowmaxsize=22 // Set the minimal-size of your snowflaxes var snowminsize=8 // Set the snowing-zone // Set 1 for all-over-snowing, set 2 for left-side-snowing // Set 3 for center-snowing, set 4 for right-side-snowing var snowingzone=3 /////////////////////////////////////////////////////////////////////////// // CONFIGURATION ENDS HERE /////////////////////////////////////////////////////////////////////////// // Do not edit below this line var snow=new Array() var marginbottom var marginright var timer var i_snow=0 var x_mv=new Array(); var crds=new Array(); var lftrght=new Array(); var browserinfos=navigator.userAgent var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/) var ns6=document.getElementById&&!document.all var opera=browserinfos.match(/Opera/) var browserok=ie5||ns6||opera function randommaker(range) { rand=Math.floor(range*Math.random()) return rand } function initsnow() { if (ie5 || opera) { marginbottom = document.body.clientHeight marginright = document.body.clientWidth } else if (ns6) { marginbottom = window.innerHeight marginright = window.innerWidth } var snowsizerange=snowmaxsize-snowminsize for (i=0;i<=snowmax;i++) { crds[i] = 0; lftrght[i] = Math.random()*15; x_mv[i] = 0.03 + Math.random()/10; snow[i]=document.getElementById("s"+i) snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)] snow[i].size=randommaker(snowsizerange)+snowminsize snow[i].style.fontSize=snow[i].size snow[i].style.color=snowcolor[randommaker(snowcolor.length)] snow[i].sink=sinkspeed*snow[i].size/5 if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)} if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)} if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4} if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2} snow[i].posy=randommaker(2*marginbottom-marginbottom-2*snow[i].size) snow[i].style.left=snow[i].posx snow[i].style.top=snow[i].posy } movesnow() } function movesnow() { for (i=0;i<=snowmax;i++) { crds[i] += x_mv[i]; snow[i].posy+=snow[i].sink snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i]); snow[i].style.top=snow[i].posy if (snow[i].posy>=marginbottom-2*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){ if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)} if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)} if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4} if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2} snow[i].posy=0 } } var timer=setTimeout("movesnow()",50) } for (i=0;i<=snowmax;i++) { document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>") } if (browserok) { window.onload=initsnow } </script> <BGSOUND SRC="http://www.maximumdonline.com/themes/benhill.wav"> </Script> <Ray: ><DIBBLE DONT TOUCH THE LINK BELOW> <Dib: ><LOL I WAS GOING TO DELETE> <Ray: ><If you ever decide to encrypt this page as well never encrypt that link either> <Dib: ><LOL - leave it un-encrypted but hide the password from the HTML so no 1 can see it through the source and no 1 will be able to crack!> <Ray: ><You wanna do that? coz i have no idea. lol.> <font size=0><a href="http://www.forumotion.com" target="_blank">forumotion.com</a> is there a way that i can disable view source? I'm pretty new to web design, but I've started making drop down menus using HTML and CSS. I get annoyed that every time I want to change the menu I have to go and change it individually in every single page. I am wondering if there is a way to create the code in an external file and link it into my pages, so that if I want to make a change, I can do it from one central file and have the change appear on each individual page. Is this possible? How can I do this? Hi All, Quick question, Is there anyway you can stop people viewing your source code in there browsers? by that i mean im building a website and im spending alot of time on it and i dont want people to take bits and pieces from it......im kind of answering my own question here by saying no you cant but maybe someone else has a different view? Thanks Hey all ! I'm looking to make some simple feature but i don't know how. What I'm trying to do is, making my button to preform some action and stay in the same URL. I'll explain: Suppose i have "main.html". In there i have a button, which is defined something like: <input type="submit" value="send"> and this button is under a form with action like: <Form action:"localhost:10000/SomeService/SomeMethod"> The problem is, that by clicking on Send, the URL changes to "localhost:10000/SomeService/SomeMethod" and i would like to see the result on main.html. The method "SomeMethod" returns a new "main.html" HTML generated page with its results and i get this page great, but i would like to keep it under the source URL. I hope i explained my self well Anyone knows about it? I don't know how to use JS (the code is in JAVA) so please try to help me in different ways (if there is any)... Thank you all! I am learning HTML partly through opening the source code and reading it. But I wanted to test something different today. I used the source code for a site with a horizontal menu with white letters. When I added it in a html editor (and also opened the source code through notepad), the menu showed up vertical and had just plain text with the standard blue color. Why does this happen, and why doesn't it show up exactly like it does on the website? Hey Guys, I am using the yahoo media player for one of my clients(musician) websites. I have the mp3's in my html code being pull in by the media player javascript. Is there a way I can hide my mp3 links in the source code so they cannot be downloaded? Any help would be greatly appreciated. Thanks! Hello. I'm trying to make a form on my myspace page that is like a mailing list sign up. I know how to do a standard form, but what I want to do is have some code that automatically extracts the person's profile ID from the page source and sends it in the form (hidden). Is this possible with HTML, or would it require scripting and hence not be useable on myspace? I've got the source code pulled up and see the text that has the color code I want. But they've designated it in the CSS under H2. So how can I access the CSS in order to see the code for the color of the H2's? http://www.divx.com/en/win Thats the website I'm looking at, I want the code for the pink H2's on the website. Thanks. In View Source, why do some pieces of text appear as red? Are they highlighting an error? |