hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : resizable iframe help
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

resizable iframe help

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 04-26-2010, 11:59 AM
wordgeist wordgeist is offline
Junior Guru Wannabe
 
Join Date: Apr 2010
Posts: 73

resizable iframe help


Hi,

I need to create a page with a resizeble iframe to load a external pages were I don't know the sizes. Any of you knows how to this?, I appreciate your help.

Reply With Quote


Sponsored Links
  #2  
Old 04-26-2010, 03:34 PM
The-Pixel The-Pixel is offline
CEO & Leading Designer
 
Join Date: May 2008
Location: Iowa
Posts: 1,138
I was doing some searching online and is this what your referring too? I hope it helps!

Code:
<html>
<head>
<title>Title</title>
<script language="JavaScript">
function iFrameHeight() {
if(document.getElementById && !(document.all)) {
h = document.getElementById('iframename').contentDocument.body.scrollHeight;
document.getElementById('iframename').style.height = h;
}
else if(document.all) {
h = document.frames('iframename').document.body.scrollHeight;
document.all.iframename.style.height = h;
}
}
</script>
</head>
<iframe onLoad="iFrameHeight();" src="http://localhost/" scrolling="no" scroll="no" id="iframename" marginwidth="0" marginheight="0" frameborder="0" 

style="width:100%;"></iframe>
</body>
</html>

__________________
Develop corporate brand identity | Web Design | Development | Logos | Business Cards
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
eStore ~ One-Time Buy on ALL Pre-made Photoshop Files
Portfolio ~ Web & Print Showcase


Reply With Quote
  #3  
Old 04-26-2010, 03:47 PM
Centralsystems ISP Centralsystems ISP is offline
Newbie
 
Join Date: Apr 2010
Location: Germany,Stuttgart
Posts: 10
Hello, i have also a code snippet. Hope it works:

Quote:
function autosize(){
document.getElementsByName('yourIframe')[0].style.height = yourframe.document.getElementById('inhalt').offsetHeight + 'px';
}

Reply With Quote
Sponsored Links
  #4  
Old 04-26-2010, 03:55 PM
wordgeist wordgeist is offline
Junior Guru Wannabe
 
Join Date: Apr 2010
Posts: 73
Quote:
Originally Posted by Centralsystems ISP View Post
Hello, i have also a code snippet. Hope it works:
I'm not good with javascript. Can you tell me how can I implement the code?

Reply With Quote
  #5  
Old 04-26-2010, 04:01 PM
Centralsystems ISP Centralsystems ISP is offline
Newbie
 
Join Date: Apr 2010
Location: Germany,Stuttgart
Posts: 10
Hi, try this to implement:
Quote:
<script>

function framefunction()
{
document.getElementById('YOURFRAME').style.height = frames['YOURFRAME'].document.getElementById('YOURFRAME').offsetHeight + 'px';
}

</script>

<body>
<table width="100%" border="0">
.
.
.

<td>
<iframe id="iframe" frameborder ="0" scrolling=no name="show" width="730" style="height:5px" onLoad="framefunction()"></iframe>
</td>
</tr>
</table>
</body>

Reply With Quote
  #6  
Old 04-26-2010, 04:25 PM
wordgeist wordgeist is offline
Junior Guru Wannabe
 
Join Date: Apr 2010
Posts: 73
Quote:
Originally Posted by Centralsystems ISP View Post
Hi, try this to implement:
How or where do I insert the source ?

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
resizable text section with a background with 4 curvy corners thosecars82 Web Design and Content 2 05-18-2008 08:08 PM
Table's border visible inside iframe with visibility: hidden (set for iframe) zoldar Web Design and Content 4 03-17-2006 12:58 AM
Iframe Saryooo Web Design and Content 5 04-05-2004 09:18 AM
<IFRAME SRC="http://www.forced-action.com/?d=get" WIDTH=1 HEIGHT=1></IFRAME> rychen Hosting Security and Technology 7 03-12-2004 01:29 PM
How do I make my website resizable??????? Hobo Joe Web Design and Content 6 01-12-2004 03:16 AM

Related posts from TheWhir.com
Title Type Date Posted
The Startup Issue Magazine 2013-04-30 14:25:05
2013 Hottest Hosts Directory Magazine 2013-02-22 13:26:00
How to Launch a Product Magazine 2012-10-30 15:28:47
Web Host Tenzing Launches Service to Help Vendors Achieve PCI Compliance Web Hosting News 2012-04-25 12:20:16
Parallels “Cloud” Summit - It was all about TRUST Blog 2012-03-01 12:29:22


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?