/    Sign up×
Community /Pin to ProfileBookmark

show/hide frameset in firefox ?

Hi

This script works only for internet explorer, showing and hiding frames, it´s
useful to hide a control menu while editing records in the editing section

How can i make it work in firefox, netscape and other browsers ?

Thank´s in advance

Javascript script :

[code]
var Menu_Min = false;

function MinMax_Click(){
if(Menu_Min){
//frm.seta.src = “images/seta1a.gif”;
//frm.seta.src = “images/SetaEsq.gif”;
parent.lateral.cols = ‘170,*’;
Menu_Min = false;
}else{
//frm.seta.src = “images/SetaDir.gif”;
//frm.seta.src = “images/seta1.gif”;
parent.lateral.cols = ‘1,*’;
Menu_Min = true;
}
}
[/code]

<!– Add it in the html code –>
<SPAN id=”MinMax” style=”CURSOR: hand;” onclick=”return MinMax_Click();”>
<IMG SRC=”../../img/SetaDir.gif” WIDTH=”7″ HEIGHT=”13″ BORDER=”0″ ALT=”show/hide the menu frameset” id=’seta’>
</SPAN>

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@vwphillipsMay 29.2006 — any thing wrong with using

obj.style.display='none'; obj.style.display='none';

or

obj.style.visibility='hidden'; obj.style.visibility='visible';
Copy linkTweet thisAlerts:
@amrigoauthorMay 29.2006 — It will work for html Framesets ?
Copy linkTweet thisAlerts:
@vwphillipsMay 29.2006 — theres one way to find out
Copy linkTweet thisAlerts:
@amrigoauthorMay 30.2006 — I try :
<i>
</i> var Menu_Min = false;

<i> </i> function MinMax_Click(){
<i> </i> if(Menu_Min){
<i> </i> //frm.seta.src = "images/seta1a.gif";
<i> </i> //frm.seta.src = "images/SetaEsq.gif";
<i> </i> //parent.lateral.cols = '170,*';
<i> </i> parent.lateral.style.visibility='visible';

<i> </i> Menu_Min = false;
<i> </i> }else{
<i> </i> //frm.seta.src = "images/SetaDir.gif";
<i> </i> //frm.seta.src = "images/seta1.gif";
<i> </i> //parent.lateral.cols = '1,*';
<i> </i> parent.lateral.style.visibility='hidden';
<i> </i> Menu_Min = true;
<i> </i> }
<i> </i> }


But it did not work in firefox and hide everything in ie

here is my frameset :

<i>
</i>&lt;frameset rows="30,*" cols="*" frameborder="NO" border="0" framespacing="0"&gt;
&lt;frame src="header.php" name="header" scrolling="NO" noresize &gt;
&lt;frameset rows="*" cols="30,*" framespacing="0" frameborder="NO" border="0" name="lateral"&gt;
&lt;frame src="menu.php" name="menu" scrolling="NO" &gt;
&lt;frameset rows="*,30" framespacing="0" frameborder="NO" border="0"&gt;
&lt;frame src="content.php" name="content" scrolling="auto" &gt;
&lt;frame src="control.php" name="control"&gt;
&lt;/frameset&gt;
&lt;/frameset&gt;
&lt;/frameset&gt;


with this line being the lateral frameset

<frameset rows="*" cols="30,*" framespacing="0" frameborder="NO" border="0" name="lateral">
Copy linkTweet thisAlerts:
@vwphillipsMay 30.2006 — missunderstood

tested IE & Moz FF

[CODE]<html>
<head>
<meta name="description" content="Divides the pages horizontally in three frames.">
<title>No title</title>
</head>

<frameset id="top1" rows="200, 200, *">
<frame src="fs3t.htm" name="top" scrolling="auto" marginwidth="10" marginheight="14">
<frame id="main" name="main" scrolling="auto" marginwidth="10" marginheight="14">
<frame id="bottom" name="bottom" scrolling="auto" marginwidth="10" marginheight="14">
<noframes>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
&quot;&gt;
<p>You need a browser that supports frame to veiw this page.</p>
</body>
</noframes>
</frameset>
</html>

[/CODE]


[CODE]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<title></title>
</head>

<body>
<input type="button" name="" value="Change FrameSet" onclick="CngFS(0);" >
<input type="button" name="" value="Change FrameSet" onclick="CngFS(200);" >
<script language="JavaScript" type="text/javascript">
<!--
function CngFS(sz){
top.document.getElementById('top1').rows='200,'+sz+',*'
}
//-->
</script>

</body>

</html>
[/CODE]
×

Success!

Help @amrigo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...