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: Making an alert() or a custom function instead of a link ?
julienM
Newbie

Posts: 1
Registered: 8/29/2008
Member Is Offline
posted on 8/29/2008 at 10:47 AM Reply With Quote
Making an alert() or a custom function instead of a link ?


Hello !

I bought tigra tree menu pro several weeks ago and by now i've only used it by making copy/past from the demos :)

But now i have to do something more specific and even if i know that it should be simple, i can't figure how to do it.

So my problem: i just want to call an alert() or a simple custom js function instead of calling a link.

something like this:

var TREE_ITEMS = [
['root', '', {'st':1},
['folderA', 'javascript:onclick=alert('test')', {'tt':'folder A'},
['file 1', '', {'tt':'file 1'}],
['file 2', '', {'tt':'file 2'}]
],
['folderB', '', {'tt':''}]
]
];


Thank you for helping me,

Julien.
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 10/6/2008 at 07:54 PM Reply With Quote

['folderA', 'javascript:alert(\'test\')', {'tt':'folder A'},

note the slashes in front of apostrophes. You already use them for terminating the string so you need to escape them inside the string. Another way is: "javascript:alert('test')"
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