Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HOW TO DISABLE THE BACK BUTTON
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
HOW TO DISABLE THE BACK BUTTON
Miscellaneous
Thread ID:
00390994
Message ID:
00390994
Views:
33
HI

I post recentLy a question about "HOW TO DISABLE THE BACK BUTTON ..."
In my reserch, I found many people asking for the same question.
I think I have a very good solution:

In fact we cannot disable the back button but we can do that:
I assume you need to enter a login name and password to acces your application.

I use two files to make that. The fist one is only use to start the application "Default.html" and will only start the real begin page. This basic page will containt that code:
(NO NEED NOTHING ELSE FOR DESING OR APPARENCE, THIS PAGE WILL NOT BE VISIBLE FOR I-USER)


-HTML-
... ... ...
-script language=javascript-
function ReplacePage()
setTimeout ("leave()", 1);


function leave() {
document.location="wc.dll?MainProc~StartRealDefault";
}
-/script-
...
-body onload="ReplacePage()"-

Note the TimeOut 1/1000 sec to start the javascript function.

My Web Connect procedure contain this function to load the real starter page:

FUNCTION StartRealDefault()
Response.ExpandTemplate('Default.wp')
ENDFUNC

My 'Default.wp' contain the real first page to let the i-user to do a login. If the i-user click on BACK button, the first page will execute in 1/1000 sec. my function to reload the real login page again ... and so one...

To ensure that again, I made a Logoff button that calling the first page DEFAULT.HTML by a javascript like that:

-Script Language="JavaScript"-
function toggle_CategoryBarMenu()
window.top.location.replace('default.htm')

-/script-

Try that !
Regards
Analystik Team
1430 Belanger
Montreal (Quebec)
Canada
(514) 278-2727
analyste@analystik.ca
Reply
Map
View

Click here to load this message in the networking platform