SmartMenus DHTML Menu / JavaScript Menu - Forums

forums

You are not logged in.

#1 2005-Mar-13 02:40:13

venkatesh
Member
From: india
Registered: 2005-Mar-13
Posts: 3

hi !! i'm a new member.. just few doubts in DHTML

can I change the size a frame dynamically.

Offline

 

#2 2005-Mar-14 04:03:48

smartmenus
Site Admin
From: Plovdiv, BULGARIA
Registered: 2003-Feb-23
Posts: 1109
Website

Re: hi !! i'm a new member.. just few doubts in DHTML

If you want to change the size of a frame with the help of JavaScript, the answer is no. You can, however, change the size of IFRAMEs in some browsers like IE/Win.


-Vasil Dinkov-

Offline

 

#3 2005-Mar-16 08:53:26

venkatesh
Member
From: india
Registered: 2005-Mar-13
Posts: 3

Re: hi !! i'm a new member.. just few doubts in DHTML

thanx for the reply ... so the iframe's size can be changed dynamically..plz can  u show me a sample of how to do it......

Offline

 

#4 2005-Mar-18 09:21:18

smartmenus
Site Admin
From: Plovdiv, BULGARIA
Registered: 2003-Feb-23
Posts: 1109
Website

Re: hi !! i'm a new member.. just few doubts in DHTML

Here's an example that will probably work in all modern browsers (although I have only tested it in IE6, Opera 7 and Netscape 6):

Code:

<!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" xml:lang="en" lang="en">
<head>
<title>SmartMenus example</title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />

<script type="text/javascript">
<!--
function changeIframeSize(){
if(!document.getElementById)
    return;
var iframeObject=document.getElementById('myIframe');
var iframeObjectStyle=iframeObject.style;
iframeObjectStyle.width='300px';
iframeObjectStyle.height='300px';
}
//-->
</script>

</head>

<body onload="changeIframeSize()">

<iframe id="myIframe" src="http://www.yahoo.com/" style="width:200px;height:200px;"></iframe>

</body>
</html>

The iframe's size will be changed onload.


-Vasil Dinkov-

Offline

 

#5 2005-Mar-22 13:44:11

venkatesh
Member
From: india
Registered: 2005-Mar-13
Posts: 3

Re: hi !! i'm a new member.. just few doubts in DHTML

thanx for the reply.. and the code.. this is goin to help me a lot man.. thanx.catch ya soon.

Offline

 

Board footer

Powered by FluxBB