| |||||||||
| |||||||||
| Not A Member Yet? Register today and become part of the community. |
| |||||||
| Programming / Scripting / Coding Forum Discussion HTML, C++, PHP, CGI, JSP, perl etc |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
My First Post -->Does anyone know how to make a link which will change the height/width of an iframe. I have this so far. HTML Code: <IFRAME src="page.html" name="pagename" width="600" height="400" scrolling="no" frameborder="0"></IFRAME> <P> <a href="otherpage.html" target="pagename">Text of Link</a> Thnks
__________________ Visit theDragon'sDen: www.theDragonsDen.us.to .:theDragon'sDen:: Entertainment Archives :. .: Pics :: Flash Games :: Video Clips :: Animations:. & More all for FREE |
| |||
| you can try replacing your width and height with 100%.
__________________ Profuse Host - http://www.profusehost.net SITE RULES - http://www.profusehost.net/services/order/index.htm POST FOR HOST GUIDE LINES - http://www.profusehost.net/forum/support/9807-post-host-guidelines.html |
| |||
| no, the original height and with are fine the way they are. It was just when I wanted it to show the page directed by the link I wanted the height/width to be different when the link is clicked. I think it would use the Code: onclick= I think it would be something like the iframe then: <a href="otherpage.html" target="pagename" onclick="pagename.width:'200'">Text of Link</a> Or at least thats one thing I tried but that doesn't work probably because its not in the right format. If someone did know it would be much appreciated.
__________________ Visit theDragon'sDen: www.theDragonsDen.us.to .:theDragon'sDen:: Entertainment Archives :. .: Pics :: Flash Games :: Video Clips :: Animations:. & More all for FREE |
| |||
| <a href="otherpage.html" target="_parent" onclick="pagename.width:'200'">Text of Link</a> parent should work if your changing the parent page and keeping a static frame |
| |||
| After a lot of searching Ifound it. Of course the answer was Javascript. Here it is... HTML Code: <head> <title></title> <script language="JavaScript" type="text/javascript"> <!-- function ReSize(id,h,src,tb){ var obj=document.getElementById(id); obj.style.height=h+\\\\\\\\\\\'px\\\\\\\\\\\'; obj.src=src; document.getElementById(tb).value=\\\\\\\\\\\'Height \\\\\\\\\\\'+h+\\\\\\\\\\\'px\\\\\\\\\\\'; } //--> </script></head> <body> <span id="Link1" onclick="ReSize(\\\\\\\\\\\'name\\\\\\\\\\\',600,\\\\\\\\\\\'http://thedragonsden.us.to\\\\\\\\\\\',\\\\\\\\\\\'TB1\\\\\\\\\\\');" >Link Name</span> <p> <iframe id="name" src="http://profusehost.net" width="500" height="200"></iframe> </body> </html> HTML Code: <a href="http://thedragonsden.us.to">Visit theDragon\\\\\\\\\\\'sDen</a>
__________________ Visit theDragon'sDen: www.theDragonsDen.us.to .:theDragon'sDen:: Entertainment Archives :. .: Pics :: Flash Games :: Video Clips :: Animations:. & More all for FREE |
![]() |
| Thread Tools | |
| Display Modes | |
| | |||||
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ads in Iframe | vampireblood | Free Web Hosting Support | 7 | 01-30-2006 02:42 PM |
| Ads in Iframe (please?) | ivokwee | Free Web Hosting Support | 4 | 01-29-2006 01:48 AM |