Hi,
Thanks you for the help. Have one further question.
I managed to change the .js for the viewInfo function, so now Opera 
and Firefox view it (although Batik still gives an error). But it 
works only for the ID, not for the Name:

function viewInfoName(evt) {
        var infoLine = document.getElementById("infoName").firstChild;
        var note= evt.target.getAttributeNS(null,"name");
        infoLine.nodeValue = note;
}

function viewInfoID(evt) {
        var infoLine = document.getElementById("infoID").firstChild;
        var note= evt.target.getAttributeNS(null,"id");
        infoLine.nodeValue = note;
}

Maybe I have not defined the name of my features correctly? (i.e. 
name="rectangle") Can somebody give me a quick reminder about the 
syntax that should be used for this? 
Thank you.
Csorba



--- In [email protected], "Andreas 
Neumann" <[EMAIL PROTECTED]> wrote:
>
> Hi Edith,
> 
> --- In [email protected], 
"csorba_edith" <csorba_edith@> wrote:
> >
> > Hi,
> > I was trying to implement a mouseover effect on my SVG map - to 
view
> > the name of the feature the mouse points at on a line - and I was
> > using the following .js code:
> > function viewInfo(evt) {
> >     var infoLine = document.getElementById("infoNote");
> >     text= infoLine.getFirstChild;
> >     var note= evt.getTarget.getAttributeNS(null,"name");
> >     text.setData(note);
> > }
> 
> evt.getTarget.... is wrong and should be evt.target....
> and it should be infoLine.firstChild and not 
infoLine.getFirstChild() - note that you omitted 
> the (), as this is a method. I am surprised that it works at all in 
ASV. Are you sure it doesn't 
> give any error messages?
> 
> That way it works in all viewers and browsers.
> 
> See also http://jwatt.org/svg/authoring/
> 
> > It functions OK in IE, but Opera/Firefox does not read this 
function
> > and Batik gives me an error:
> > "viewinfo is not defined"
> > The same is the situation with the .js code I use to check the
> > visibility of a layer (so it can be turned on/off):
> > function viewLayer(name) {
> >     theLayer = document.getElementById(name);
> >     theVisibility = theLayer.getAttributeNS(null,"visibility");
> >     if (theVisibility == "visible") {
> >             theLayer.setAttributeNS(null,"visibility", "hidden");
> >             }
> >     else if (theVisibility == "hidden") {
> >             theLayer.setAttributeNS(null,"visibility", "visible");
> >     }
> > }
> 
> I don't see what's wrong here.
> 
> In case you want to display your attributes as tooltips, I provide 
a tooltip script at 
> http://www.carto.net/papers/svg/gui/mapApp/ , see example at
> http://www.carto.net/papers/svg/gui/tooltips/
> 
> Andreas
>







-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to