refreshing and visited links? (Full Version)

All Forums >> [Web Development] >> Microsoft FrontPage Help



Message


RickP -> refreshing and visited links? (10/3/2005 17:00:22)

I'm sure this is going to be simple...

I want visited links on a page to be a distinct colour but I want them all to retrun to 'normal' when the page is refreshed - what's the obvious way?




AMysticWeb -> RE: refreshing and visited links? (10/4/2005 2:53:50)

The visited link color is there to show the site visitor he or she has visited this link previously. I am not sure if a refresh would accomplish what you want.

This has always troubled me when putting a page together, so now I have both the link and visited link the same color. Go figure.




RickP -> RE: refreshing and visited links? (10/4/2005 6:40:30)

quote:

so now I have both the link and visited link the same color.


Indeed, but what I want to achieve is something very specific for a particular project - too much to explain - but I just want a way of 'clearing' visited links and yet still want a distinct colour for them when they are used prior to 'clearing' them.

?




caz -> RE: refreshing and visited links? (10/4/2005 7:07:39)

Put a note on to tell the visitor to clear their cache - otherwise you are trying to take control of the user's system and that is really not a Good Thing [tm]




rdouglass -> RE: refreshing and visited links? (10/4/2005 7:47:33)

quote:

but I want them all to retrun to 'normal' when the page is refreshed


The only way I can think of is to wrap each link in a <span> tag and maybe use a JavaScript to set a different color with an onClick event. Then when the page refreshes / reloads, they should go back to the original color.

Doesn't seem too difficult at first glance but most things always seem that way at first.[;)]




jaybee -> RE: refreshing and visited links? (10/4/2005 8:58:24)

Rick, I'm sure this isn't the case but

have you lost it completely? [:D]

A visited link is a visited link. Some poor so and so out there has spent days working out how to cache the information so that people can tell they've visited a page already and now you want to trample all over their hard work!

You evil person you. [;)]




RickP -> RE: refreshing and visited links? (10/4/2005 9:49:49)

quote:

have you lost it completely?


I know, I know... this is such a way-out and out-landish and out-right just out of order out of one's mind kind of thing to even contemplate!!! I thought I'd just commit web design suicide by mentioning what I'm up to here on a web design forum[sm=fie.gif] [:D]

Now you all force me to go the long way... so I'll explain and then maybe some kind-hearted and understanding soul will be only too pleased to help [:D]

... I work part-time doing some driving for a local day centre (web des don't give me enough cash yet![:(]). The folk there have various disabilities. They play some games that involve numbers and someone asked how do they dispaly LARGE numbers on a PC screen to show to a group in a largish room. Well, I took the thing in hand and am just designing a custom 'large number displayer' for them.

This is NOT intended for online use at all it is only designed to run on their local PC. Here it is though so you can see what want I to achieve.

I want the clicked numbers to change colour (like visited links) but then they must be able to be reset again. No doubt javascript / other approaches would do the job but I'm looking for the easy option.

So, am I really a such bad person!? [sm=unsure.gif]




rdouglass -> RE: refreshing and visited links? (10/4/2005 10:04:00)

quote:

No doubt javascript / other approaches would do the job but I'm looking for the easy option.


IMO JavaScript or clearing the cache are the easy solutions. [8|]




RickP -> RE: refreshing and visited links? (10/4/2005 10:07:05)

is there a jscript code to clear cache?




caz -> RE: refreshing and visited links? (10/4/2005 10:13:24)

Make them use Firefox and set the cache limit to 0Kb in Options>Privacy and something similar for IE ( can't remember all that stuff for IE[:D]).

In this context you are not a bad person - but a very caring one[;)]




spitfire -> RE: refreshing and visited links? (10/4/2005 10:18:56)

No. you're a very kind, caring person. Truly you are[:D]
What about turning off/clearing cache on the local machine (then showing how to turn it on again, of course)? Could you achieve something by altering the order in which you declare the various link states?
Have you asked onthewebnow? Silly me.[:)] That's your goodself ain't it?

From my point of view it works just fine now. The hover is important, but I can't see why you'd need to muck around with separate styling for the visited state. How will it actually benefit users who need large numerals when the visited ones are much smaller? a..n..d.. if they are playing bingo they will know what numbers have been visited from their cards[;)]




d a v e -> RE: refreshing and visited links? (10/4/2005 11:23:26)

not sure i completely understand but how about using Friefox's Miscellaneous > visited links > marks all links unvisited in the developer toolbar??




RickP -> RE: refreshing and visited links? (10/4/2005 13:18:10)

Thanks All

I like the spitfire Spitfire - not seen your animation before!

quote:

How will it actually benefit users who need large numerals when the visited ones are much smaller? a..n..d.. if they are playing bingo they will know what numbers have been visited from their cards


Well, now I think about it the visited links aren't absolutely vital to the operation but I just thought that 'bingo' and the like might benefit from an on-screen record of what's been clicked. But it is interesting how something that might sound like a very basic question doesn't appear to have a very simple answer (!). I'll keep it simple for now and leave it as it is and maybe launch the mark2 highly visible number displayer next year[:D]

Thanks again all[;)]




RickP -> RE: refreshing and visited links? (10/4/2005 13:27:39)

quote:

Friefox's Miscellaneous > visited links > marks all links unvisited in the developer toolbar??


That's an interesting one to note... does it mark them as visited in the session still or just doesn't apply the visited colour/formatting at all?




jaybee -> RE: refreshing and visited links? (10/4/2005 13:31:01)

[sm=lol.gif]




spitfire -> RE: refreshing and visited links? (10/4/2005 13:33:20)

quote:

not seen your animation before

Ah, I don't get out as often as I used to.

Here's a thought. Your people are doing something and may be aided by knowing which numbers have already come up. Say, it's a game or some such. Wouldn't they want to know which numbers have been visited for the duration of the game? If so, when the game/activity is over, closing and re-opening the widget would start the new session off with a fresh slate. Then you can amaze them with your expertise.
Or, have I now made myself look completely silly [image]http://www.cheesebuerger.de/images/smilie/konfus/a085.gif[/image]




jaybee -> RE: refreshing and visited links? (10/4/2005 13:39:46)

I've never played widget before. How does that one go?




dpf -> RE: refreshing and visited links? (10/4/2005 13:41:39)

quote:

I've never played widget before.
is that OT?




jaybee -> RE: refreshing and visited links? (10/4/2005 13:42:51)

NO. Didn't he get arrested?




dpf -> RE: refreshing and visited links? (10/4/2005 13:44:05)

you must mean ET or OJ




spitfire -> RE: refreshing and visited links? (10/4/2005 14:02:24)

quote:

I've never played widget before. How does that one go?

Well, what you do is... nah... you're too young and maybe even too lady-like for me to carry on. Besides, I assume there is a rude word bleeper on this forum.[8D]




rdouglass -> RE: refreshing and visited links? (10/4/2005 14:13:05)

C'mon guys - you're hijacking this thread. [:o] [;)]




jaybee -> RE: refreshing and visited links? (10/4/2005 14:17:01)

quote:

That's an interesting one to note... does it mark them as visited in the session still or just doesn't apply the visited colour/formatting at all?


Just for the session I believe. You wouldn't want it to turn them off permanently.




rdouglass -> RE: refreshing and visited links? (10/4/2005 14:51:01)

I threw together an example page code that does allow you to change the color behind the links using a simple JavaScript and some span tags.

I haven't tried integrating it into your page but the way I see it, it shouldn't be that difficult. You'd need a little more CSS to turn those links into boxes but hopefully you get the idea as to what I was talking about.

<html>

<head>

<script language="JavaScript"><!--
document.write('<style>');
if (document.layers)  document.write('.region { position: relative; }');
document.write('<\/style>');
//--></script>

<script language="JavaScript"><!--
function changeColor(id) {
	if (document.getElementById) document.getElementById(id).style.backgroundColor = 'red';
	else if (document.layers)    document[id].bgColor = 'red';
	else if (document.all)       document.all[id].style.backgroundColor = 'red';
}
//--></script>
</head>

<body>
<table border="0" cellpadding="0" cellspacing="0" width="140">
  <tr>
    <td width="20"><a href="javascript:changeColor('01');"><span id="01" class="region">01</span></a></td>
    <td width="20"><a href="javascript:changeColor('02');"><span id="02" class="region">02</span></a></td>
    <td width="20"><a href="javascript:changeColor('03');"><span id="03" class="region">03</span></a></td>
    <td width="20"><a href="javascript:changeColor('04');"><span id="04" class="region">04</span></a></td>
    <td width="20"><a href="javascript:changeColor('05');"><span id="05" class="region">05</span></a></td>
    <td width="20"><a href="javascript:changeColor('06');"><span id="06" class="region">06</span></a></td>
    <td width="20"><a href="javascript:changeColor('07');"><span id="07" class="region">07</span></a></td>
  </tr>
  <tr>
    <td width="20"><a href="javascript:changeColor('08');"><span id="08" class="region">08</span></a></td>
    <td width="20"><a href="javascript:changeColor('09');"><span id="09" class="region">09</span></a></td>
    <td width="20"><a href="javascript:changeColor('10');"><span id="10" class="region">10</span></a></td>
    <td width="20"><a href="javascript:changeColor('11');"><span id="11" class="region">11</span></a></td>
    <td width="20"><a href="javascript:changeColor('12');"><span id="12" class="region">12</span></a></td>
    <td width="20"><a href="javascript:changeColor('13');"><span id="13" class="region">13</span></a></td>
    <td width="20"><a href="javascript:changeColor('14');"><span id="14" class="region">14</span></a></td>
  </tr>
</table>
</body>

</html> 




d a v e -> RE: refreshing and visited links? (10/4/2005 15:02:10)

quote:

threw together an example page
so modest ;) (and helpful!)




womble -> RE: refreshing and visited links? (10/4/2005 19:21:47)

Hijacking a thread and it's not one of the 'usual suspects' - nah, it'd never happen! Ooops, just noticed pdf's already been here so there goes that theory! [;)]

I've been thinking cookies? Session cookies? Some way (button perhaps to make it really easy for usera) to clear session cookies? Don't know if it's possible - just an idea (hey, why take the easy route when you can make life so much more difficult? [8D])




golfer -> RE: refreshing and visited links? (10/5/2005 4:03:38)

Not being so expert as some of the other people here I have to think simple. (I'm very good at that)

Is it possible to build a review page so when a number pressed as at present your front page remains as it is. When the number is selected it is automatically logged onto the review page. If at any time the numbers need to be checked the operator can go to that page.

If you insert a button which clears the review page numbers the game can begin afresh. That way an operator has control over the system.

How to do it? I haven't a clue.[:)]

Hope it's of some value.




RickP -> RE: refreshing and visited links? (10/5/2005 7:51:59)

Thanks again for all further suggestions everyone[;)]

R.Douglass... thanks for the jscript code. I don't think I (personally) can easily encorporate it at this stage but it would be the way to start next time - yes, it does just what I was wanting [;)]

Cheers




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.09375