/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] How to hide a fame form a onLoad event

Hi, i’m back again, this time with a harder question. i have searched the forums but i haven’t found a solution for this problem that will work with me.

What i want to do is hide the frame named Subcart when a particular page (ShoppingCart.html) is loaded up in the [B]main[/B] frame. I only want it to work on IE.

This is the Framset page (the top page), (sorry about indent):

<frameset rows=”25%, 55%, *” frameborder=”0″ border=”0″ framespacing=”0″>
<frame name=”topFrame” scrolling=”no” noresize src=”pages/logo.htm”>
<frameset cols=”190,*
” frameborder=”” border=”” framespacing=”2″>
<frameset>
<frame scrolling=”NO” src=”pages/nav.htm” noresize>
<frame name=”[B]main[/B]” src=”pages/liverpool.html”>
</frameset>
<frame name=”[B]Subcart[/B]” src=”pages/Subcart.html” scrolling=”YES”>
</frameset>
</frameset>

This is the hide page function in the ShoppingCart.html page:

function loadform()
{
//parent.myFrameset.cols=”0%”;
top.hideFrame(“Subcart”);
//top.hideFrame(“Subcart.html”);
//top.Subcart.rows = “0%”;
}

As you can see i have tried different methods (the syntax is most likey wrong, i just looked around on different sites., but all in vain. I thought the [B]top.hideFrame(“Subcart”);[/B] would work but i get an error saying [B]Object doesn’t support this property or method[/B]

Any suggestions?

Thanks in advance.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@NatdripApr 13.2006 — hi there

<span id="frameCont" style="visibility:visible;">

your frameset1

</span>

on some action

document.getElementById('frameCont').style.visibility='hidden'>

hope this helps
Copy linkTweet thisAlerts:
@benzinoauthorApr 13.2006 — Hi,

I tried that but it didn't work, I kept getting an error saying object required. Although I did assume that the ">" was a typing error and replaced it with a ";".

Thanks for your help though.
Copy linkTweet thisAlerts:
@benzinoauthorApr 13.2006 — Just got it. Instead of hiding the frame, i should just reduce it's size to 0.

I did this by naming my first frameset as "first", as follows:

<frameset [B]name ="first"[/B] rows="25%, 55%, *" frameborder="0" border="0" framespacing="0">

<frame name="topFrame" scrolling="no" noresize src="pages/logo.htm">

<frameset cols="190,*
" frameborder="" border="" framespacing="2">

<frameset>

<frame scrolling="NO" src="pages/nav.htm" noresize>

<frame name="main" src="pages/liverpool.html">

</frameset>

<frame name="Subcart" src="pages/Subcart.html" scrolling="YES">

</frameset>

</frameset>

Then the following line reduces it's size to 0%:

top.first.rows="25%, 75%, *";

Thanks Natdrip for your help
×

Success!

Help @benzino 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.24,
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,
)...