D
DaRik
Hello,
I'm putting together a menu with explorer like maps and I need to pass
a reference to the current node to another function that will change
the appearance of the map.
In the js I'm using DOM to build up the menu. I need to do something
like:
var mapnode = document.createElement('a');
mapnode.setAttribute("href", "javascriptpenMap(mapnode)");
but this code generates an error on the second line that mapnode isn't
defined (although it is just the line above).
'this' doesn't work either, so how can I submit the reference to the
function?
Another thing I thought of, was that if it was possible to retrieve
the position of the current node (for example body -> child 2 -> child
1 ) I would be able to find a reference to the node with something
like:
test = bodyNode.childNodes.item(2).childNodes.item(1)
Is this possible?
Thanks in advance
Rick
I'm putting together a menu with explorer like maps and I need to pass
a reference to the current node to another function that will change
the appearance of the map.
In the js I'm using DOM to build up the menu. I need to do something
like:
var mapnode = document.createElement('a');
mapnode.setAttribute("href", "javascriptpenMap(mapnode)");
but this code generates an error on the second line that mapnode isn't
defined (although it is just the line above).
'this' doesn't work either, so how can I submit the reference to the
function?
Another thing I thought of, was that if it was possible to retrieve
the position of the current node (for example body -> child 2 -> child
1 ) I would be able to find a reference to the node with something
like:
test = bodyNode.childNodes.item(2).childNodes.item(1)
Is this possible?
Thanks in advance
Rick