
snorky
|
| Posted: 02/14/2003, 7:20 PM |
|
Hello,
Situation:
- Start page with 3 frames resp: topFrame menuFrame and mainFrame
- MainFrame starts with login and does redirect to welcome screen
- The welcome screen should update the topFrame and menuFrame
That is now done by javascript:
function page_OnLoad()
{
var result;
//End page_OnLoad
//Custom Code @14-2A29BDB7
// -------------------------
loadFrames('topFrame' , 'menu/menutop1.php' , 'menuFrame' , 'menu/mainmenu1.php');
// -------------------------
//End Custom Code
//Close page_OnLoad @1-BC33A33A
return result;
}
//End Close page_OnLoad
<!-- Begin
function loadFrames(frame1,page1,frame2,page2) {
eval("parent."+frame1+".location='"+page1+"'");
eval("parent."+frame2+".location='"+page2+"'");
}
// End -->
- However , the reference pages in javascript are hardcoded!
The question is:
How can I make the number of the group_id be corporated in the reference names?
e.g. Now 'menu/menutop1.php' but should be something like
'menu/menutop$group_id.pgp'
I have the feeling that I can not use php in the HTML area.
I am using CCS 1.0.7 , MySQL and PHP
|
|
|
 |
Ken
|
| Posted: 02/16/2003, 9:57 PM |
|
Place this code in the before show event of the page. Replace the header line with your frame loading code.
//Custom Code @28-2A29BDB7
if (CCGetSession("GroupID") == 3)
header("Location: YourFormName.php");
//End Custom Code
This example and many others can be found at http://www.kabwebs.com/ccsniplets/index.php
|
|
|
 |
|

|