I have a snippet of a function below I fire up in the body tag of my
webpage to show a hidden layer and do some stuff when any link with
the name "showlink" is clicked.
In the displayed layer there is some html and more javascript. How
would I update the value of "str" with "node_id" each time a link is
clicked? I can't figure it out...
Many thanks,
Chris
// function in body tag
function showStuff(evt,t xt){
var node = (evt.target) ? evt.target : ((evt.srcElemen t) ?
evt.srcElement : null );
if (node.getAttrib ute("NAME") == "showlink") {
node_id = node.getAttribu te("ID");
var cfmBox = document.getEle mentById(frmBox );
var cfmData = document.getEle mentById("cfmDa taAsset");
cfmData.setAttr ibute('value', node_id);
}
}
-----------------------------------------------------------------------------------------------------------------------
// script in body, hidden layer
<script type="text/javascript">
myFunction(str) ;
</script>