Bluehost.com Web Hosting $6.95

Two Frames, one action, update both, How??

This is a discussion on Two Frames, one action, update both, How?? within the PHP Language forums, part of the PHP Programming Forums category; Hi All, My site has two frames, one with a menu system, one with the selected results. I can select ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-13-2006
steve
 
Posts: n/a
Default Two Frames, one action, update both, How??

Hi All,
My site has two frames, one with a menu system, one with the
selected results.
I can select a menu item and get the other frame to reflect that
selection.

But I want to select 'log out' from the menu and remove the menu sytem
as well as putting a default welcome page in to 2nd frame.

Any ideas will be gratefully received

New to PHP, and HTML

Steve

Reply With Quote
  #2 (permalink)  
Old 10-13-2006
Erwin Moller
 
Posts: n/a
Default Re: Two Frames, one action, update both, How??

steve wrote:

> Hi All,
> My site has two frames, one with a menu system, one with the
> selected results.
> I can select a menu item and get the other frame to reflect that
> selection.
>
> But I want to select 'log out' from the menu and remove the menu sytem
> as well as putting a default welcome page in to 2nd frame.
>
> Any ideas will be gratefully received
>
> New to PHP, and HTML
>
> Steve


Hi STeve,

You are probably new to JavaScript then also. :-)
You need Javascript to update more frames at once.
That eans that visitors with JavaScript disabled will not be able to use
your site.
You might consider a setup without frames.

If you want to solve it with JavaScript, try something like this:
[for more question try cop.lang.javascript]

The framedefinition:
2 frames, name them, eg "navframe" and "mainframe"
navframe contains a file named nav.php
mainframe contains any file.

If somebody clicks on 'logout' in nav.php:
<a href="" onClick="doLogOut();return false;">logout</a>

<script type="text/javascript">
function doLogOut(){
// replace two pages in a frame:
top.frames["mainframe"].location="welcome.php";
top.frames["navframe"].location="whatever.php";
}
</script>

not tested, might contain typos. ;-)
Good luck.

Regards,
Erwin Moller
Reply With Quote
  #3 (permalink)  
Old 10-13-2006
Erwin Moller
 
Posts: n/a
Default Re: Two Frames, one action, update both, How??

[typocorrections:]

Hi Steve,

That *m*eans that visitors with JavaScript disabled will not be able to use
your site.

If you want to solve it with JavaScript, try something like this:
[for more question try co*m*p.lang.javascript]

Regards,
Erwin Moller
Reply With Quote
  #4 (permalink)  
Old 10-13-2006
Geoff Berrow
 
Posts: n/a
Default Re: Two Frames, one action, update both, How??

Message-ID: <1160731860.309297.50770@i42g2000cwa.googlegroups. com> from
steve contained the following:

>But I want to select 'log out' from the menu and remove the menu sytem
>as well as putting a default welcome page in to 2nd frame.
>
>Any ideas will be gratefully received


Just link to a new frameset.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Reply With Quote
  #5 (permalink)  
Old 10-13-2006
steve
 
Posts: n/a
Default Re: Two Frames, one action, update both, How??


Geoff Berrow wrote:

> Message-ID: <1160731860.309297.50770@i42g2000cwa.googlegroups. com> from
> steve contained the following:
>
> >But I want to select 'log out' from the menu and remove the menu sytem
> >as well as putting a default welcome page in to 2nd frame.
> >
> >Any ideas will be gratefully received

>
> Just link to a new frameset.
>
> --
> Geoff Berrow (put thecat out to email)
> It's only Usenet, no one dies.
> My opinions, not the committee's, mine.
> Simple RFDs http://www.ckdog.co.uk/rfdmaker/


Hi Geoff,
Thanks for the suggestion, but so new that it means very little to
me, how do I link to a new frameset?

:-(
Steve

Reply With Quote
  #6 (permalink)  
Old 10-13-2006
steve
 
Posts: n/a
Default Re: Two Frames, one action, update both, How??


Erwin Moller wrote:

> [typocorrections:]
>
> Hi Steve,
>
> That *m*eans that visitors with JavaScript disabled will not be able to use
> your site.
>
> If you want to solve it with JavaScript, try something like this:
> [for more question try co*m*p.lang.javascript]
>
> Regards,
> Erwin Moller


Hi Erwin,
Yes your right I'm also very new to javascript :-)

but thanks for replying and offering the help

Steve

Reply With Quote
  #7 (permalink)  
Old 10-13-2006
.:[ ikciu ]:.
 
Posts: n/a
Default Re: Two Frames, one action, update both, How??

Hmm steve <steven.stone4@btopenworld.com> wrote:
> Any ideas will be gratefully received


Just make action on one form then this form will make action on second form


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ikciu | gg: 718845 | yahoo: ikciu_irsa | www: www.e-irsa.pl

2be || !2be $this => mysql_query();


Reply With Quote
  #8 (permalink)  
Old 10-13-2006
Geoff Berrow
 
Posts: n/a
Default Re: Two Frames, one action, update both, How??

Message-ID: <1160734258.826626.33780@f16g2000cwb.googlegroups. com> from
steve contained the following:

> Thanks for the suggestion, but so new that it means very little to
>me, how do I link to a new frameset?


You have a page containing two frames. That page is probably called
index.htm. This contains code to load other .htm files into two
starting frames. Just make a copy of this file and edit it so that it
points to two different starting frames. If you save that file as
newframeset.htm you can jet to it with the following:

<a href='newframeset.htm' target='_parent'>Log out of menu</a>

If you want the menu back do the same thing in reverse.

That said, frames are generally regarded as the work of the devil these
days because of the difficulty in bookmarking pages.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Reply With Quote
  #9 (permalink)  
Old 10-13-2006
steve
 
Posts: n/a
Default Re: Two Frames, one action, update both, How??


Geoff Berrow wrote:

> Message-ID: <1160734258.826626.33780@f16g2000cwb.googlegroups. com> from
> steve contained the following:
>
> > Thanks for the suggestion, but so new that it means very little to
> >me, how do I link to a new frameset?

>
> You have a page containing two frames. That page is probably called
> index.htm. This contains code to load other .htm files into two
> starting frames. Just make a copy of this file and edit it so that it
> points to two different starting frames. If you save that file as
> newframeset.htm you can jet to it with the following:
>
> <a href='newframeset.htm' target='_parent'>Log out of menu</a>
>
> If you want the menu back do the same thing in reverse.
>
> That said, frames are generally regarded as the work of the devil these
> days because of the difficulty in bookmarking pages.
> --
> Geoff Berrow (put thecat out to email)
> It's only Usenet, no one dies.
> My opinions, not the committee's, mine.
> Simple RFDs http://www.ckdog.co.uk/rfdmaker/


Thanks Geoff,
I'll give it a go, and I'm coming to the same opinion on frames ;-)

Steve

Reply With Quote
  #10 (permalink)  
Old 10-16-2006
steve
 
Posts: n/a
Default Re: Two Frames, one action, update both, How??


Geoff Berrow wrote:

> Message-ID: <1160734258.826626.33780@f16g2000cwb.googlegroups. com> from
> steve contained the following:
>
> > Thanks for the suggestion, but so new that it means very little to
> >me, how do I link to a new frameset?

>
> You have a page containing two frames. That page is probably called
> index.htm. This contains code to load other .htm files into two
> starting frames. Just make a copy of this file and edit it so that it
> points to two different starting frames. If you save that file as
> newframeset.htm you can jet to it with the following:
>
> <a href='newframeset.htm' target='_parent'>Log out of menu</a>
>
> If you want the menu back do the same thing in reverse.
>
> That said, frames are generally regarded as the work of the devil these
> days because of the difficulty in bookmarking pages.
> --
> Geoff Berrow (put thecat out to email)
> It's only Usenet, no one dies.
> My opinions, not the committee's, mine.
> Simple RFDs http://www.ckdog.co.uk/rfdmaker/


Just to let you know, I took the frames out and shot them, I'm now
using CSS and it works lovely

:-)

Regards

Steve

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 12:30 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0