Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: How use the -hs- tag for Event Handlers
rvazquezto
Junior Member

Posts: 8
Registered: 6/4/2003
Member Is Offline
posted on 9/18/2003 at 10:55 PM Reply With Quote
How use the -hs- tag for Event Handlers


<!-- hi i have one problem to try use the -hs- tag for Event Handler, when try to implement, the program showme the message: --Se produjo un error en tiempo de ejecucion . ?Desea depurarlo? Linea: 9 Error se esperaba un objeto ---- then the system open a new browser window try to show the page 0 (cero) whats wrong?. the code is : -->
<html>
<head>
<style>
a, A:link, a:visited, a:active
{color: #0000aa; text-decoration: none; font-family: Tahoma, Verdana; font-size: 11px}
A:hover
{color: #ff0000; text-decoration: none; font-family: Tahoma, Verdana; font-size: 11px}
p, tr, td, ul, li
{color: #000000; font-family: Tahoma, Verdana; font-size: 11px}
.header1, h1
{color: #ffffff; background: #4682B4; font-weight: bold; font-family: Tahoma, Verdana; font-size: 13px; margin: 0px; padding: 2px;}
.header2, h2
{color: #000000; background: #DBEAF5; font-weight: bold; font-family: Tahoma, Verdana; font-size: 12px;}
.f
{color: #000000; font-family: Tahoma, Verdana; font-size: 11px; padding-left: 15px; padding-right: 15px;}
</style>
<script language="JavaScript" src="tree.js"></script>
<script language="JavaScript" src="tree_items.js"></script>
<script>
TREE_ITEMS = [
['Catalogo de Cuentas', 0, {'tt' : 'Window object', 'sb':'Window object'},
['Cuenta de Mayor', 0, {'tt' : 'Properties of the window object', 'sb' : 'Properties of the window object'},
['Sub Cuenta', 0, {'tt' : 'Document object', 'sb' : 'Document object'},
['Sub Sub Cuenta',0,{'hs' : 'colocaCuenta(this)'}], <!-- using the -hs tag -->
['Sub Sub Cuenta',0,{'hs' : 'colocaCuenta(this)'}] <!-- using the -hs tag -->
]
]
]
];
function colocaCuenta(o_item){
alert("Execution OK :" + o_item.a_config[0]);
}
</script>
<script language="JavaScript" src="tree_tpl.js"></script>
<link rel="stylesheet" href="tree.css">
</head>
<body bottommargin="15" topmargin="15" leftmargin="15" rightmargin="15" marginheight="15" marginwidth="15" bgcolor="white">
<table cellpadding="0" cellspacing="20" border="0" width="100%">
<tr>
<td valign="top">
<div style='width:300'>
<script language="JavaScript">
new tree (TREE2_ITEMS, TREE_TPL);
</script>
</div>
</td>
<td valign="top">
<div style='width:300'>
<script language="JavaScript">
new tree (TREE_ITEMS, TREE2_TPL);
</script>
</div>
</td>
</tr>
</table>
</body>
</html>
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 9/19/2003 at 07:00 AM Reply With Quote

You should declare event handler without any parameters. E.g.:
['Sub Sub Cuenta',0,{'hs' : 'colocaCuenta'}],
...
function colocaCuenta(o_item){
alert("Execution OK :" + o_item.a_config[0]);
}
View User's Profile View All Posts By User U2U Member
rvazquezto
Junior Member

Posts: 8
Registered: 6/4/2003
Member Is Offline
posted on 9/19/2003 at 07:13 PM Reply With Quote
????? dont work !!!


Quote:
Originally posted by rock
You should declare event handler without any parameters. E.g.:
['Sub Sub Cuenta',0,{'hs' : 'colocaCuenta'}],
...
function colocaCuenta(o_item){
alert("Execution OK :" + o_item.a_config[0]);
}



the error is not present BUT on a new browser windows or on another browser window show the page 0 (cero) or null, what can i do to prevent this?
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 9/20/2003 at 08:45 AM Reply With Quote

Please find examples of localy defined event handler in demo4 of your Tigra Tree Menu PRO distribution package.
View User's Profile View All Posts By User U2U Member
rvazquezto
Junior Member

Posts: 8
Registered: 6/4/2003
Member Is Offline
posted on 9/21/2003 at 02:22 AM Reply With Quote
in demo4 dont have select item event!!!


[quote][i]Originally posted by rock[/i]
Please find examples of localy defined event handler in demo4 of your Tigra Tree Menu PRO distribution package. [/quote]

Sorry but for handle the select item event the documentation, only say the -hs- tag, not mention -function onItemSelectHandler (o_item) - .. I just need the execution one javascript function when the user click on a final node of the tree, do you have some sample for that?, do you send me the sample please?
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 9/21/2003 at 03:58 AM Reply With Quote

Please contact us at http://www.softcomplex.com/support/
View User's Profile View All Posts By User U2U Member
rvazquezto
Junior Member

Posts: 8
Registered: 6/4/2003
Member Is Offline
posted on 9/21/2003 at 04:28 AM Reply With Quote
thanks very much!!!


Quote:
Originally posted by rock
Please contact us at http://www.softcomplex.com/support/


i found why dont work its the - return true; - on the function colocaCuenta, the function recite:

function colocaCuenta(o_item){
alert("Execution OK :" + o_item.a_config[0]);
return true;
}


Realy thanks for hear me..
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Multiple Trees
Frames Targeting
Icons and Styles Overloading
Event Handling
Performance Test
Version 1.2 features
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004