You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Upayavira <uv...@odoko.co.uk> on 2005/11/28 21:20:19 UTC

Re: Maintain the state of visited links

Fadi Qutaishat wrote:
> Hi all,
> 
> I have got the following problem:
> 
> I have two sets of links the first one is a table of
> contents links and the second one is a personalisation
> links which leads to a form to change the font size,
> background colours etc.
> 
> When I click one of the table of contents links, the
> colour of this visited link is turned from blue into
> red which is what I want. The problem now is when I
> click one of the personalisation links to change, for
> example, the font size, the table of contents' links
> will not maintain their state and their colour will be
> as if they have not been visited yet.
> 
> I am transferring the parameters through the urls to
> be sent to the server for processing and then
> returning the results to the screen. 
> 
> Is there an easy way to main the state of the visited
> links even when there is a change occurred in the
> parameters transferred within the url to the server?

That is the behaviour of your browser. And your browser will compare the
full URL to see if it has been visited before. I guess you could work
around this by having forms the page and using POST to pass the data to
the pages, thus you keep the same URL even with different data. That's
how I'd look into getting it to work.

Regards, Upayavira

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Maintain the state of visited links

Posted by Fadi Qutaishat <fa...@yahoo.com>.
Many thanks Christoph,

It seems a nice idea I will try it out.

Regards,

Fadi 



		
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Maintain the state of visited links

Posted by Christoph Hermann <ch...@guschtel.de>.
Fadi Qutaishat schrieb:

Hello,

> Do you think the encodeURL transformer would help me?

I don't think so. What i would do is remember on the serverside if a
link was already visited, and if so display the link styled with another
 class than an unvisited link.

You would then generate the links on the serverside (pseudocode):

if (MyApp.isVisitedLink(url)) {
  class="visited"
} else {
  class="link"
}
displayLink(url,class);


I.e.:
<a href="http://www.example.com/page.html" class="visited">Some Page</a>
<a href="http://www.example.com/p2.html" class="link">Other Page</a>

And "link" would style Links in blue and "visited" would style them in
green (or whatever else).

HTH
Christoph

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Maintain the state of visited links

Posted by Fadi Qutaishat <fa...@yahoo.com>.
Thank you Upayavira for the response,

Do you think the encodeURL transformer would help me?

Regards,

Fadi 






	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org