I use a little javascript to make open pop up link and this is Valid
XHTML Strict!.
I know maybe there are many master here, and i just share my little knowledge.

Below this code and example :
1. create javascript code and save as .js file
--------------
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.onload = externalLinks;

------------
2. call that js into the page
<script type="text/javascript" src="js/blank.js"></script>

3. change for target="_blank" into rel=="external" on link tag a href

this work on ie, firefox, NS, opera etc.
For online sample visit http://www.rayofshadow.or.id/pop.htm

thanks
Ray | http://www.rayofshadow.or.id
*i was send with wrong email*

On 7/30/05, Brian Cummiskey <[EMAIL PROTECTED]> wrote:
> Thierry Koblentz wrote:
> > Hi all,
> > I'd appreciate your feedback about this technique that does not rely on
> > hooks; it only uses the href attribute...
> > http://www.tjkdesign.com/articles/popups.asp
> 
> 
> 
> Looks good Thierry.
> 
> One thing though--  what happens to mailto: links?
> 
> i know in an *old* switcher i had:
> 
> if(href.indexOf("mydomain.com") == -1){ // Href is not a file on my server
>                        if(href.indexOf("javascript:") == -1){ // Href is not 
> a javascript call
>                                if(!anchors[i].onclick){ // Href does not have 
> an onclick event
>                                        if(href.indexOf("mailto:";) == -1){ // 
> Href is not a mailto:
>                                                if(href.indexOf("http://";) != 
> -1){ // Href is not relative (for
> Safari)
>                                                        
> anchors[i].setAttribute("target","_blank");
>                                                }
>                                        }
>                                }
>                        }
>                }
> 
> 
> I found the the mail and safari links got all weird.
> 
> perhaps this is something to look into or test if you haven't already.
> 
> ******************************************************
> The discussion list for  http://webstandardsgroup.org/
> 
>  See http://webstandardsgroup.org/mail/guidelines.cfm
>  for some hints on posting to the list & getting help
> ******************************************************
> 
>
******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to