Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: FRAMESETS and Javascript 'Add Favourites' links


Message #1 by "Laphan" <laphan@u...> on Tue, 11 Sep 2001 21:24:01 +0100
Try with the saveFavorite behavior. Here is an example
(it is not mine, it's taken from MSDN):

<HTML>
<HEAD>
<STYLE>
   .saveFavorite
{behavior:url(#default#savefavorite);}
</STYLE>
<SCRIPT>
   function fnSaveInput(){
     
oPersistInput.setAttribute("sPersistValue",oPersistInput.value);
   }
   function fnLoadInput(){
     
oPersistInput.value=oPersistInput.getAttribute("sPersistValue");
   }
</SCRIPT>
</HEAD>
<BODY>
<INPUT class=saveFavorite onsave="fnSaveInput()"
onload="fnLoadInput()" type=text id=oPersistInput>
</BODY>
</HTML>


--- Laphan <laphan@u...> wrote:
> Hi All
> 
> I have a 3 FRAME web site (1 horizontal frame at the
> top and 2 vertical
> frames below this).
> 
> The vertical frame on the right is the one that
> changes to the pages that
> the user clicks on the navigation panel which
> resides on the left vertical
> frame.  Standard fare really.
> 
> My problem is that I want to put an 'Add to
> Favourites' link on each page
> that is displayed on the RHF (right hand frame), but
> this causes me a
> problem.  If the user then goes back to that
> Favourite they lose my 3 Frame
> layout and it goes pear shaped.
> 
> The code for my Add to Favourites link is as
> follows:
> 
> <A
>
HREF="javascript:window.external.Addfavorite('http://www.laphan.co.uk/about.
> html', About Page')" >Add to Favourites</A>
> 
> This type of link has been round a bit now, but I
> need to improve on it.  I
> basically want the favourite to show the 3 FRAME
> layout, but in the RHF I
> want it to be the page that they clicked the
> Favourite link on (ie, About
> Page) and not the first page that appears when
> opening my web site (ie, my
> Home Page).
> 
> Can anybody get round this?
> 
> Rgds
> 
> 
> Laphan
> 
> laphan@u...

  Return to Index