Well, I figured out a way to do it, but it wasn't easy for this novice.
Using Philippe's example with javascript as the basis (
http://www.nettalkcentral.com/index.php?option=com_smf&Itemid=36&topic=240.msg828#new)
... I simply used what he had, but instead of adding code to the "body" routine, I left it blank so it gets generated. Then, before the part where that routine's code is generated, I did a simple case statement:
CASE p_web.GetSessionValue('LLVL')
OF 1
packet = clip(packet) & |
'<<body onload="load1()" ><13,10>'&|
'<</body><13,10>'&|
''
OF 2
packet = clip(packet) & |
'<<body onload="load2()" ><13,10>'&|
'<</body><13,10>'&|
''
END !Case
Then, as you can imagine, I simply added two functions instead of the one:
<script type="text/javascript">
function load1()
{
window.location="ListRequisitions"
}
function load2()
{
window.location="HomePage"
}
</script>
The reason I was doing it this way is because I was not finding the SetCookie stuff to be persistent for some reason, so I used session values instead. It would be nice to have this in a template though.