How do I change the CSS dynamically

Question: Ok - here we go. I have a web report where the user is able to click on a tab to view 1 of 3 views of the report - Sum, Semi, or Detail. Each of these reports uses a different data provider and a different CSS. The user can then click on the 'Create Downloadable Page' button to view the report. When they click the link to go back to the Interactive Page is when the problem occurs. Because each of the 3 views uses its own CSS, I need a way to dynamically capture that CSS and apply to page when they go back. The way it runs now, no matter what view they were on (even Semi or Detail), it goes back to the page and uses the Sum CSS, which has the wrong tab highlighted. The data is correct, but the users are easily confused by the wrong tab highlighted Please help if you can.

Answer:
Hi
maybe this coding helps:

<html>
<head>
<title>test for dynamic CSS</title>
<script language="JavaScript" type="text/javascript">
var n_var = 1;
switch (n_var)
{
case 1:
document.write('<link rel="stylesheet" href="c:\\daten\\Screen.css" type="text/css">');
break;
case 2:
document.write('<link rel="stylesheet" href="c:\\daten\\Screen1.css" type="text/css">');
break;
}
</script>
</head>
<body>
<table>
<tr>
<td class="SAPBEXTableGrid">TestOMat</td>
</tr>
</table>
</body>
</html>


you just need a field (variable,cookie or whatever you like) to decide which css to load
Hope it helps
Stephan
Copyright ?2007 - 2008 www.jt77.com