Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 13th, 2004, 12:25 PM
funkyirishman funkyirishman is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 8 funkyirishman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 57 sec
Reputation Power: 0
Smile Frames & orphan Pages

Hi

I have a website at
When a user logs into the above page we want the frames to appear with the nfsc in the main page

Is there any java that can do this ?

Also we also want to give the user the option to break out of these frames. So the user can click on a link that will break the frames

How can we do this ?

Cheers

Funkyirishman

Reply With Quote
  #2  
Old July 13th, 2004, 02:43 PM
EiSa EiSa is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Norway
Posts: 184 EiSa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 24 sec
Reputation Power: 7
If you place this code in your body-tag:
Code:
<body onload="if (top!=self) top.location=self.location;">


It will break out of the frames. Just put in the page that you wan't to break out of the frames.
If you wan't to use a link to break out of the frames:
Code:
<script type="text/javascript">
<!--
function breakout(){
if (top!=self) top.location=self.location;
}
-->
</script>

<a href="javascript:" onclick="breakout();">Break out</a>



I guess your frameset has a name, just redirect to that page name if the login is a success and the frames should appear. I do this myself when I login to my admin-pages. (Which is the only time I use frames). If you don't have to use frames, don't use them, to many disadvatages.
__________________
Strictly CSS | Poker Cognac XO

Reply With Quote
  #3  
Old July 14th, 2004, 07:39 AM
funkyirishman funkyirishman is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 8 funkyirishman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 57 sec
Reputation Power: 0
Hi EiSa

Thanks for that

Do I put the below on all my pages ?

<body onload="if (top!=self) top.location=self.location;">

Or do I just put them in the left frame and top frame

My frameset page is this my home page

Cheers

Funkyirishman

Reply With Quote
  #4  
Old July 14th, 2004, 08:29 AM
EiSa EiSa is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Norway
Posts: 184 EiSa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 24 sec
Reputation Power: 7
You put <body onload="if (top!=self) top.location=self.location;"> only in those pages you wan't to break out of the frameset. If you put this code in the left frame or top frame, these pages will break out of the frameset.

Your frameset page is your homepage of worldeasy.com, and it's name is index.htm according to what I can see.

Reply With Quote
  #5  
Old July 14th, 2004, 09:09 AM
funkyirishman funkyirishman is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 8 funkyirishman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 57 sec
Reputation Power: 0
Frames & Orphan Pages

Hi EiSa

Thanks

Sorry thought the script was for when a user logs into one of our pages the frames appear.

You dont know a script that can do this ?

Funkyirishman

Reply With Quote
  #6  
Old July 14th, 2004, 11:06 AM
EiSa EiSa is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Norway
Posts: 184 EiSa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 24 sec
Reputation Power: 7
Yes, there are script's that will force one page into a frameset. Have never used it. An example of this you can see here:
http://www.ballade.no

Try to open up any link in a new window and you will see what I mean.

Perhaps you can find some answer here:
http://developer.irt.org/script/frame.htm

Reply With Quote
  #7  
Old July 14th, 2004, 12:26 PM
funkyirishman funkyirishman is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 8 funkyirishman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 57 sec
Reputation Power: 0
Frames & Orphan Pages

Hi EiSa

This is the script I need I think but where can I amend it to suit my webpage to incorporate my left frame and topper frame

Dont know where to amend the below script ?

Thanks

Funkyirishman

<script language="javascript" type="text/javascript">
<!--
// URL til side som default lastes i hoved_frame
pageURL = "/nmi.nsf/doc/ballade";
// script som sjekker om det er sendt inn en URL, og parser denne
if (parent.document.URL) {
parentURL = parent.document.URL;
if (parentURL.indexOf('=') != -1) {
pageURL = parentURL.substring(parentURL.indexOf('=')+1,paren tURL.length);
}
}
if (top != self) {
if (document.images)
top.location.replace(self.location.href);
else
top.location.href = self.location.href;
}
else {
document.write('<frameset cols="*,795,*" border="0">');
document.write('<frame name="venstre" src="/mic.nsf/g/dummy.html" framespacing="0" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
document.write('<frameset rows="140,*" border="0">');
document.write(' <frame name="topp_frame" src="/mic.nsf/g/ballade_topp.html" framespacing="0" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
document.write(' <frame name="hoved_frame" src="' + pageURL + '" marginwidth="0" marginheight="0" scrolling="yes" frameborder="0">');
document.write('<\/frameset>');
document.write('<frame name="hoyre" src="/mic.nsf/g/dummy.html" framespacing="0" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>');
document.write('<\/frameset>');
}
-->
</SCRIPT>

Reply With Quote
  #8  
Old July 14th, 2004, 02:17 PM
EiSa EiSa is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Norway
Posts: 184 EiSa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 24 sec
Reputation Power: 7
The script you have found you should put into the page that holds the frameset code (index.htm), I shall translate the beginning of the code:
// URL to page which shall be loaded into main frame
pageURL = "/nmi.nsf/doc/ballade";
// script which chek's if it's sent a URL, and parses this one
if (parent.document.URL) {
parentURL = parent.document.URL;
if (parentURL.indexOf('=') != -1) {
pageURL = parentURL.substring(parentURL.indexOf('=')+1,paren tURL.length);
}

In every page that they wan't to force into the frameset, they have used this code (yourfile.htm is the name of this page):

<script language="javascript" type="text/javascript">
<!--
if (top.location == self.location) { // If the page isn't in a frameset
if (document.images)
top.location.replace("/yourfile.htm" + "?opendocument&url=" + window.location.href);
else
top.location.href = "/yourfile.htm" + "?opendocument&url=" + window.location.href;
}
//-->
</script>

This is how they have done this, I tested it myself, but it wouldn't work as intended so I can't help you more with this problem. I think the answer is here: http://developer.irt.org/script/frame.htm, but I'm not sure.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Development > Frames & orphan Pages


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT