Forum Moderators: open
Here's the funky part:
When I click on a link to take me to another page WITHIN the site, all the javascripted links turn to their a:visited color.
This only happens in IE6. Works fine in IE7 and Firefox Mac/PC.
What is going on?
Sample code:
Code in the Head:
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
Code at the link:
<p class="darktext"><a href="#hitnews01" onclick="MM_openBrWindow('http://www.example.com/', 'healthcareitnews', 'toolbar=yes, location=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, width=800, height=600')">Healthcare IT News</a></p>
Here's the CSS:
a:link {
text-decoration: none;
}
a:visited {
color: #6699CC;
text-decoration: none;
}
a:hover {
color: #F7931D;
text-decoration: none;
}
a:active { color: black; }
Please help. If I had hair, I'd have pulled it out by now.
Randy
[edited by: jatar_k at 9:00 pm (utc) on Aug. 2, 2007]
[edit reason] no urls thanks [/edit]
I coded the href like that as an attempt to make each link distinct from the other. When I use the default "#", all the javascripted links change as soon as I click just one of them. My problem is that when I click a link to take me to another page in the site, ALL the js'd links turn color. I have to reset my cache to bring everything back to the default.
This happens if I make the href "#" or "javascript;:" or "javascript:void(0);"
I have a site set up with many links to external sites as well as navigational in-site links. All the external links are coded to show up in a new browser window. Javascript is used to make this happen. These links show up on every page.
I have also coded in a .css file an a:visited link, which changes the color to something besides purple, but after experimenting, this problem arises even when using the default a:visited color.
Here's the problem: Whether or not I actually click one of the javascripted links, ALL of them simultaneously change to the a:visited color whenever I navigate to another page WITHIN the site.
1. Click to another page
2. See a whole bank of un-clicked links turn color.
I don't think this is how this behavior is supposed to work, and it only happens in IE6.
Thanks.
Randy
Maybe something like this?
<p class="darktext"><a href="http://www.google.com" onclick="MM_openBrWindow(this.href, 'healthcareitnews', 'toolbar=yes, location=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, width=800, height=600'); return false;">Healthcare IT News</a></p>
I'm using unique addresses in the HREF and still using your openBrWindow function.
Is that what you were looking for?
<a href="#0801_01" onclick="MM_openBrWindow('http://www.example1.com','','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=600')">blah blah</a>
<a href="#0801_02" onclick="MM_openBrWindow('http://www.example2.com','','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=600')">yada yada</a>
If I click on example1, it will then turn to the VISITED color. But then, if I click to another page on the site, example2, 3, 4, 5, etc., will also turn visited.
RG
Etc.
Also, I don't really have to worry about universal user-friendliness since the site is on an intranet where everyone uses IE6 on a Windows2000 platform.
so if you want it to correctly recognise the outside link as being visited or not visited or whatever, then you need to place it inside the href.
there is no way around it.