CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Popup message window for restricted page?

Print topic Send  topic

Author Message

Posts: 17
Posted: 07/10/2014, 10:12 PM


I'm trying to find a way to show a message in a popup window/dialog when a user, who belongs in a restricted group, tries to enter a restricted page instead of redirecting to an Access Denied Page as CC does, or the login page. The message should explain that current user does not posses permission to see the page. I know this window can be done easily with JavaScript, with 'alert();' so I tried putting a custom code in the Before Initialize event of the restricted page:
global $group;  
global $db;  
$db=new clsDBCon1();  
$us= CCGetUserLogin();  
if ($group != 1000){  
	echo"<script languaje='JavaScript'>alert('You can't access this page.')</script>";  

However, it doesn't work so well. It doesn't allow for such users to access the page (this is the good part) but it's not showing the small window with the message (the bad part). I took out the 'header' part and the window shows but it also allows the restricted page to be loaded. I've also set Restricted property to 'No' because otherwise CC ignores my code and returns me to the login page.

Any advice would be very much appreciated!

View profile  Send private message

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

Home   |    Search   |    Members   |    Register   |    Login

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