- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
JSL to add event handler
I'm trying to add an event handler column property using the following code but it isn't working. I can manually apply the property, but can't figure out a script based method. Can this be done by JSL?
// Create hyperlink for URL column
:Current Firmware URL << Add Column Properties(
Event Handler,
Function( {thisTable, thisColumn, iRow},
Web( Char( thisTable:thisColumn[iRow] ) ); // open a web page
)
);
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: JSL to add event handler
just a hint:
to solve this type of scripting tasks (add formula, add properties, add event handler),
it may always be a good way to have a working table with that properties and look into the table script
(red triangle --> copy table script), there is the code to replicate the table functionality!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: JSL to add event handler
Nevermind,
After locating Add Hyperlinks to Columns in the online help, I was able to locate the code to add hyperlinks as expected. Should have known that the help manual would have had the solution. If only I looked a little harder.
// Create hyperlink for URL column
:Current Firmware URLX << Set Property(
"Event Handler",
Event Handler(
Click(JSL Quote(Function( {thisTable, thisColumn, iRow}, Open( Char( thisTable:thisColumn[ iRow ] ) ); );)
),
Tip(JSL Quote(Function( {thisTable, thisColumn, iRow}, "Open " || Char(thisTable:thisColumn[ iRow ] ) || " in a web browser."; );)
),
Color( JSL Quote(Function( {thisTable, thisColumn, iRow}, 5; );) )
)
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: JSL to add event handler
just a hint:
to solve this type of scripting tasks (add formula, add properties, add event handler),
it may always be a good way to have a working table with that properties and look into the table script
(red triangle --> copy table script), there is the code to replicate the table functionality!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content