Yes, you can open in a new window with XHTML, just not using the
target="_blank" attribute which is wicked and nasty in XHTML and will get
you banished from the kingdom. Do not pass go and do not collect $200.
I open external links usually in a new window, and while you can't use the
target attribute, you can do it another way that's valid XHTML1.0 Strict,
but it uses a tiny amount of _javascript_.
To open in a new window using XHTML make your links like this:
[code]
<.a href="" rel="external">Macromedia</a>
[/code]
And you have a tiny piece of _javascript_ that you can have as an external
file referred to in the header (I call mine 'external.js'):
[code]
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}
window.>
[/code]
Cheers
Mike Kear
Windsor, NSW, Australia
AFP Webworks
http://afpwebworks.com
.com,.net,.org domains from AUD$20/Year
_______________________________________
From: Mark Henderson [mailto:[EMAIL PROTECTED]
Sent: Thursday, 26 August 2004 12:45 PM
To: CF-Talk
Subject: RE: Photo Album Modification
*slaps forehead* correct, thanks Jim. I have it working now. I need them in
a list for another purpose which I've now solved. Getting ahead of myself
again it seems. Your point re using a database for more control is noted and
understood, and for a full-on feature rich photoalbum I can understand it's
benefits. I only wanted to whip something up requiring a minimum of fuss
when updating.
The next thing is opening the full image in a new window (using coldfusion,
not _javascript_) and without a target name (since the doctype is xhtml).
Anyone know if this is even possible?
Regards
Mark H
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- Photo Album Modification Mark Henderson
- Re: Photo Album Modification Jim McAtee
- Re: Photo Album Modification Les Mizzell
- Re: Photo Album Modification Jim McAtee
- RE: Photo Album Modification Mark Henderson
- RE: Photo Album Modification Michael Kear
- RE: Photo Album Modification Mark Henderson
- RE: Photo Album Modification Ken Ferguson
- Re: Photo Album Modification Mark Henderson