Hi Otasyn,

Otasyn <[EMAIL PROTECTED]> wrote on 05/24/2007 11:39:53 AM:

> <script type="text/ecmascript" >
>     function changeRect(rectName) {
>         var useElem = document.getElementById('useElem');
>         if (useElem.getAttribute('href') != null) {
>             document.getElementById('useElem').setAttribute('href','#' +
> rectName);
>         }
>         else if (useElem.getAttribute('xlink:href') != null) {
> document.getElementById('useElem').setAttribute('xlink:href','#'
> + rectName);
>         }

    If you are trying to set the 'href' attribute in the
xlink namespace (and you are) this is wrong according to the DOM spec.
You want to use something like:

var xlinkns = "http://www.w3.org/1999/xlink";;

 document.getElementById('useElem').setAttributeNS(xlinkns, "xlink:href", 
"#"+rectName);

> This works in FireFox and Opera.

   The above should work in FF and Opera otherwise they are totally
broken and I don't think they are.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to