CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Help, Autoload frames depending on group_id

Print topic Send  topic

Author Message
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



   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.