<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<s:head theme="ajax" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="javascript">
var botao = {
clicar : function() {
alert("Clicou no registro : ");
}
};
</script>
</head>
<body>
<s:url id="index" action="Tree"></s:url>
<div align="left" id="t">
<s:tree label="Help Desk" id="parentId" theme="ajax">
<s:treenode label="Técnico" theme="ajax">
<s:treenode label="Cadastrar Técnico" id="%{index}" onclick="botao.clicar();" theme="ajax">
</s:treenode>
</s:treenode>
</s:tree>
</div>
</body>
</html>
Gente como eu faço para chamar essa função javascript ? Ao clicar no treenode Cadastro Técnico nao chama a função javascript !!!