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 data in cell a hyperlink
darkromz
Junior Member

Posts: 5
Registered: 11/17/2005
Location: UK
Member Is Offline
posted on 11/17/2005 at 03:37 PM Reply With Quote
Making data in cell a hyperlink


I would like to make say all the results in the 1st cell hyperlinks, so when one is clicked it can open another window carrying over a value from that link into the next screen which will then display other information.
View User's Profile View All Posts By User U2U Member
rblackmond
Junior Member

Posts: 4
Registered: 11/17/2005
Location: San Antonio, TX
Member Is Offline
posted on 11/17/2005 at 10:26 PM Reply With Quote

I have the same need. I guess the OnClick would be used, but there's no examples in the manual or demo files showing how to use it. I'm very green with JavaScript so I work best by example. Thanks.
View User's Profile View All Posts By User U2U Member
rblackmond
Junior Member

Posts: 4
Registered: 11/17/2005
Location: San Antonio, TX
Member Is Offline
posted on 11/17/2005 at 10:54 PM Reply With Quote

Aha! I did find reference to the OnClick handling in the manual!

http://www.softcomplex.com/products/tigra_tables_pro/docs/#handling

I haven't read it thoroughly yet, but hopefully this will provide the solution.
View User's Profile View All Posts By User U2U Member
darkromz
Junior Member

Posts: 5
Registered: 11/17/2005
Location: UK
Member Is Offline
posted on 11/18/2005 at 10:26 AM Reply With Quote

Quote:
Originally posted by rblackmond
I have the same need. I guess the OnClick would be used, but there's no examples in the manual or demo files showing how to use it. I'm very green with JavaScript so I work best by example. Thanks.


I am pretty much the same, work by examples... I will have a look at the tutorial a bit later on, if i find out how to do it, i will post it here..
View User's Profile View All Posts By User U2U Member
darkromz
Junior Member

Posts: 5
Registered: 11/17/2005
Location: UK
Member Is Offline
posted on 11/18/2005 at 04:45 PM Reply With Quote

ok, this is how i am doing a hyper link within a cell at the moment.

The current, content file holds the data like so....
Quote:

// table data
var TABLE_CONTENT = [
['these are', 'top', 'frozen', 'cells']
];



Here i have just simply placed the code for a link in the same place as the value data which is going to be displaced in the 2nd cell, thus making it a hyperlink

Quote:

// table data
var TABLE_CONTENT = [
['these are', '<a href="linkhere">top</a>', 'frozen', 'cells']
];



All my data is held in a access database at the moment, so i just have a small script which generates the lines as above.
View User's Profile View All Posts By User U2U Member
rblackmond
Junior Member

Posts: 4
Registered: 11/17/2005
Location: San Antonio, TX
Member Is Offline
posted on 11/18/2005 at 05:57 PM Reply With Quote

I used an Onclick function. In the template.js file I added the following code:

function row_clck(marked_all, marked_one) {
window.location = "lookup.php?unit="+marked_one;
}
// structure that describes visual aspects of the table
var TABLE_LOOK = {
'key': 0, // field column to use as 'marked_one'
'onclick': row_clck, // function to be called when a row is clicked

I considered your method, but I really just needed one link for each row and I didn't care which column they clicked on so this seemed the better choice for that. :)
View User's Profile View All Posts By User U2U Member
spw
Member

Posts: 44
Registered: 12/8/2005
Location: Australia
Member Is Offline
posted on 1/16/2006 at 06:29 AM Reply With Quote

I have also used onclick - see my example entitled
"Using onclick instead of <A HREF=.... "
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Simple
XP-styled
3D designed
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