Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Refresh Another Frame in same window
Old 05-03-2007, 06:14 PM Refresh Another Frame in same window
InfinitySchima's Avatar
Skilled Talker

Posts: 71
Name: Rafael Schimassek
Trades: 0
Hi there,

I am currently working on a big project of mine with uses a rather big number of frames, and while the center frame is the main frame the side frames show some aditional information and process some infos (PHP).
What I would like to know is if there was a command to refresh the page of, for example, Frame B, with some code from FrameA
For example: In "Frame A" I would have the code to refresh. So whenever I would manually refresh "Frame A" it should also refresh "Frame B" (because of the code).

They are not Incorporated Frames, I am using a FrameSet.

I have searched the web for some time, found something which nears it

Code:
<meta http-equiv="refresh" content="3;url=http://www.site-name-in-here.com" target=_parent>


I tested a bit, like changing the "target" atribute but it seems like this atribute doesn't belongs to this tag, it always keeps refreshing the page where my code is in.

So, if anyone could give me some help on this...

Basic Question (for quick repliers): What is the code to refresh another frame in the same frameset?

It's like updating 2 (or more) frames when updating just one frame.
I could say this is pretty vital for my project.

Thanks in advance
Schimassek...
InfinitySchima is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-03-2007, 08:43 PM Re: Refresh Another Frame in same window
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
What is the code to refresh another frame in the same frameset?
You can't.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-04-2007, 07:16 AM Re: Refresh Another Frame in same window
InfinitySchima's Avatar
Skilled Talker

Posts: 71
Name: Rafael Schimassek
Trades: 0
No? Is there absolutely no way?

Isn't there even a code to do it in JavaScript or PHP (doubtful).

And if even not JavaScript (Visual Basic is just for Microsoft, right?) is there a code to at least refresh the whole frameset?

Schimassek...
InfinitySchima is offline
Reply With Quote
View Public Profile
 
Old 05-04-2007, 08:12 AM Re: Refresh Another Frame in same window
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
you can do it with javascript, but it's a real pain int **s..

The easiest is to have your frames named in your frameset.
Then from 1 frome, you could do
Code:
top.parent.frames['nameOfTheFrame'].reload();
or
Code:
top.parent.frames['nameOfTheFrame'].location="http://www.wathever.com";
If you have a form, you want to send to a specific frame, use an attribute target="nameOfTheFrame" in the form declaration.

If you want a link to load in another frame, you may be ok using
Code:
<a href="http://www.wathever.com/" target="nameOfTheFrame">blah blah</a>
But I'm just not sure if it will be ok or if it's only for iframes.
Otherwise, you will need to use javascript functions to do something like
Code:
function goUrl(_url,_fset){
  top.parent._fset.location=_url;
}

<a href="javascript:goUrl('http://www.wathever.com','nameOfTheFrame');>blah blah blah</a>
But trust me, you'd better redesign your site without frames before going in this jungle...
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 05-04-2007, 10:15 AM Re: Refresh Another Frame in same window
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
I would have to agree, dump the frames. They are not good in general and they are definitely a bad idea if you're at all concerned about the search engines.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-04-2007, 02:32 PM Re: Refresh Another Frame in same window
InfinitySchima's Avatar
Skilled Talker

Posts: 71
Name: Rafael Schimassek
Trades: 0
The page isn't an informative page or so, it's a Browser Multiplayer Game.

About the search engines...I will have it assured that the Main Menu and other Public Access Pages won't have frames, the only part where you have frames is the actual game, where you need to register and login to access.

I believe that there won't be a problem if I just put a part of the site with frames, the other part won't have them.

Now about the code, thanks Tripy, the .reload() code didn't functioned (maybe just with iframes) but the code with "location=x" worked pretty well.

I don't find it so complicated with links going to different frames.
I already created all the fundaments, the only thing what was left was this reload command.
At the moment I have 15 frames, hehe, but like 6 of them never change, I only think I fear a bit is if it doesn't pushes much the server.

Thanks a lot for the info. Schimassek
InfinitySchima is offline
Reply With Quote
View Public Profile
 
Old 05-04-2007, 05:18 PM Re: Refresh Another Frame in same window
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
The .reload() correspond to the hit of the button reload. It means too that the frame must have a loaded page, otherwise reload() won't do anything.
The location property correspond to the field where you enter the url in the browser, so there it respond.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 05-04-2007, 07:01 PM Re: Refresh Another Frame in same window
InfinitySchima's Avatar
Skilled Talker

Posts: 71
Name: Rafael Schimassek
Trades: 0
Actually, when I have put the reload command I had already a page loaded in that frame (when I declared the frameset).
But loading the page again (with the location command) is basically the same as reloading (of course the location is the same)? I tried it and it worked fine, I just hope there aren't some browsers there who don't reload the page because they have it already in the history and just display the unupdated page. Besides, I'm using IE 6.
InfinitySchima is offline
Reply With Quote
View Public Profile
 
Old 05-04-2007, 08:08 PM Re: Refresh Another Frame in same window
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
No, there should be no problems by using location="" with any actual browser.
IE6 included (Even when I say actual, sigh...)
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 05-05-2007, 05:05 AM Re: Refresh Another Frame in same window
InfinitySchima's Avatar
Skilled Talker

Posts: 71
Name: Rafael Schimassek
Trades: 0
Well, that's perfect. This was really an important step for my game, no more manually refreshing.

Thanks a lot for the help
InfinitySchima is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Refresh Another Frame in same window
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.32320 seconds with 12 queries