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

 Want to Disable Back Button of Browser

Print topic Send  topic

Author Message
Monika
Posted: 02/13/2002, 3:17 AM

Hi,

I am developing an application in which I want the User can see one random record at a time on the screen, and could not go to back screen by simply pressing Back Button of the Browser.

How Can I Disable the Back Button of the Browser, so User Can't do this in CC.

Please Help Me.

Monika
Ravi
Posted: 02/13/2002, 3:46 AM

Please visit hotscripts.com
Nicole
Posted: 02/13/2002, 5:07 AM

Monika,
I think the better way is to use JavaScript to force users use site links rather than back in forward buttons in browser.
Tom
Posted: 02/13/2002, 7:10 AM

Didn't see anything in hotscripts so if someone can point me to a solution, thanks in advance.
Brent
Posted: 02/13/2002, 7:16 AM

If you're using PHP, I believe there is an internal variable that has the
page that you came from. (If you can't find it, then use a session variable
that gets set to the current form name when each page loads)

When a special page loads (one that you don't want to go back to), you check
to see if this previous page variable is set to one of the pages that are not
allowed (next page). If this happens, simply jump back to the calling page (next page).
Dave
Posted: 02/13/2002, 11:05 AM

Has anyone got anything to expand on this or some sample code to try out, i to am in need of a solution to this.


thanks

dave
Helen
Posted: 02/14/2002, 1:50 AM

Hello,
In case you'll use JavaScript to forbid users to use browser back and forward buttons put to body tag put:
<body {PageBODY} onUnload = "my_func()">

and to footer section of the page:
<script language = "JavaScript">
function my_func()
{
window.location = window.location.href;
}
</script>

If you use template pattern and generate Site.css file you may create Custom Show Page event and define body tag there, e.g.:
ASP
SetVar "PageBODY", stylePageBODY & " onUnload = ""my_func()"""
In templateless version create Custom Show Page event and modify <body> tag there.

Regards,
Helen

   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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