This topic is locked
[SOLVED]

 change color of row after click on view (pop up)

11/1/2011 2:11:56 PM
PHPRunner General questions
M
mickna author

I lost after a system crash my latest project versions and I try to recreate the last steps.
I have had a solution (thx again to Christian)
I want to change the color of the specific row, if the user clicks on view and open the pop up view.

However, this did not work any more. No idea what's happening:

  1. changed the colours of rows via "List page:After record processed"

if ($data....) {$row["rowstyle"]='style="background:#CAA"';}


2) as Christian suggested in "List page: JavaScript OnLoad event":

$('[id^="viewLink"]').click(function(e){

$(this).parents().eq(1).removeAttr("style");

});


This did not work now. I know this had worked like a charm. Any help?
Thank you,

mickna

C
cgphp 11/1/2011
$('[id^="viewLink"]').click(function(e){

$(this).parents().eq(1).children("td").removeAttr("style");

});
M
mickna author 11/2/2011

Thank you Christian! As always working like a charm....
I do not wanna bother you, but may you can explain me why I now need ".children("td")" ? Is it new in PR6?
thank you for your time and efforts,

mickna

C
cgphp 11/2/2011

In PR6 the background attribute is set for every column of the row.

M
mickna author 11/2/2011

What could I say? Thank you!