I think I'm gonna go with my previous solution.  Here's part of the
code I have so far.  It works with PHP and the smarty framework.

it hides email addresses to those not using Javascript (hopefully

 $text = $address;

      global $smarty_mailto_span_count;
        $span_id= "_smarty_mailto_span_".++$smarty_mailto_span_count;

        $string = 'var mailto=document.getElementById("'.
                   mailto.innerHTML=\'<a href="mailto:'.$address.'" '.

        $js_encode = '';
        for ($x=0; $x < strlen($string); $x++) {
            $js_encode .= '%' . bin2hex($string[$x]);

        return '<span id="'.$span_id.'">to see email address, enable
                <script type="text/javascript">'.$string.'</script>';

I can't say I like having to put it in a span with a new id each time,
but it works. So, I think I will stick with this unless there is a
better way to do it.

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to