Data table-element, color formatting and "onclick event"

Hello, 

we have a customer that wants to see all registered requests registered on a customer. 
The way we do this is to create a web panel (in a ticket) that shows a data table containing all the requests registered on the same cust_id. 

The Data Table contains this: 

- Simple values
callbackDisplay = callbackDisplay
callbackInit = callbackInit
callbackSort = callbackSort

urlAppendField = ticket.id
url = ticket.fcgi?action=listTicket&ticketId=

- Body

String callbackDisplay(SearchEngine se, String field)
{
return se.getField(field);
}

Void callbackInit(SearchEngine se)
{
SearchEngine se2;
se2.addField("ticket.cust_id");
se2.addField("ticket.id");
se2.addCriteria("ticket.id", "OperatorEquals", getCgiVariable("entryId"));
se2.execute();
se.addCriteria("ticket.cust_id", "equals", se2.getField("ticket.cust_id"));
}

String callbackSort(SearchEngine se, String value)
{
return se.getField(value);
}


-- 
This works, and i get the results i expect back, yey!

My question/issues are as follows: 
1. When I click on one of the requests i expect it to open that request.. It actually opens the request, but only in the small window/web panel on the original one.
My screen then looks like this:  

I would like it to open in the "main window", as its logical that i want to open the request i am clicking on in the table. 

2. I havent been able to figure out how i can color-format the rows depending on Status of the request. 

I tried looking in the documentation but I cant find any usefull input on how this is done, but i see Static Table v2 has some 'better options' for doing this. Is it possible to color the row depending on Status? in the documentation they insert the fields in simple values, then add a hidden field named author, then color format this spesific field depending on the status, but neither include the fields in simple values or want just 1 field to be colored. 

The reason for not adding the fields in simple values is that i want the users to themselves be able to adjust the table/layout/columns themselves. 

//Eivind

RE: Data table-element, color formatting and "onclick event"

I think you could fix this problem by chaning the target to _parent if I'm not mistaken.

Av: Simen Mostuen Iversen 2. okt 2017

RE: Data table-element, color formatting and "onclick event"

Hello, 
Thank you for the reply. 

It looks like _parent will do the trick, but i cant figure out how i can set this to be included in the window.open. It is default set to _self and i cant figure out how to replace it. 
Do i have to create my own map of some sort, and set url = myMap? Or can this be done a different way? 
I havent found anything regarding how "url =" works in Data Table, so i cant really say what parameters i can input.. 

Av: Eivind Johan Fasting 2. okt 2017

RE: Data table-element, color formatting and "onclick event"

Hello world

Any suggestions on this? I have tried everything i can think of and roamed the forum day and night since last week, without success :(

Av: Eivind Johan Fasting 9. okt 2017

RE: Data table-element, color formatting and "onclick event"

Figured out i can override the onclick-event with a jQuery

Av: Eivind Johan Fasting 10. okt 2017