Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing frameset properties? (Quickie)

Status
Not open for further replies.

iaresean

Programmer
Mar 24, 2003
570
ZA
Is it possible to change a framesets properties. For eg setting the scrolling from no to yes.

Thanks in advance.

Sean.
 

I haven't used frames in so long, that I've forgotten the syntax..

But yes, you should be able to do it, sometihng like:

Code:
frameName.scrolling = 'no';

Or

Code:
frameName.setAttribute('scrolling', 'no');

Might work.

Dan
 
It keeps on saying that my frame is undefined. That is wierd because the link also that is clicked on opens up in the frame that I want to change.

Any idea why?

Sean.
 
Ok, Here is a copy of my index.html file :
Code:
[COLOR=green]
<html><head>
<title>Test</title>
</script>
</head>

<frameset rows=&quot;20%,80%&quot; border=&quot;1&quot; framespacing=&quot;5&quot; frameborder=&quot;1&quot; scrolling=&quot;yes&quot;>
        <frame SRC=&quot;top.html&quot; scrolling=&quot;no&quot; marginwidth=&quot;2&quot;>
                                                                                                                                                             
        <frameset cols=&quot;20%,55%,20%&quot; scrolling=&quot;yes&quot;>
                <frame src=&quot;links.html&quot; name=&quot;links_frame&quot;>
		<frame src=&quot;main.html&quot; name=&quot;main_frame&quot; id=&quot;main_frame&quot; scrolling=&quot;no&quot;>
		<frame src=&quot;extra.html&quot; name=&quot;extra_frame&quot; scrolling=&quot;no&quot;>
        </frameset>
</frameset>

</html>
[/color]
And here is the code from my links.html page:
Code:
<html>
<body background=&quot;computerback.gif&quot;>

<center>
<P><P>
<font size=&quot;+2&quot; color=&quot;white&quot;><b>click.to.proceed</b></font><P>
<a href=&quot;stories.html&quot; onClick=&quot;window.document.main_frame.setAttribute('scrolling', 'yes');&quot; target=&quot;main_frame&quot;><img src=&quot;button1.jpg&quot;></a><P>
</center>

</body>
</html>
[/color]

Any ideas whats going on? Thanks in advance.

Sean.
 
Sean,

Try using either:

Code:
parent.main_frame.setAttribute('scrolling', 'yes');

or:

Code:
top.main_frame.setAttribute('scrolling', 'yes');

And see if that works.

Dan
 
I tried it, and now it just says that setAttribute is not a function.

Phew, this is harder than it should be.

Sean.
 

Try just:

Code:
parent.main_frame.scrolling = 'yes';

or:

Code:
top.main_frame.scrolling = 'yes';

And see if that does it... I'm running out of ideas ;o)

Dan


 
I am still having zero luck.

Anyone test this on their machine and get a positive result?


Sean.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top