Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Removing the History?

Reply
Thread Tools

Removing the History?

 
 
George Hester
Guest
Posts: n/a
 
      10-17-2004
A user comes to the site and is presened with a Logon page. They enter the correct info in the
form and they are in. I am doing it like this:

<head>
<script type="text/javascript">
function form_onsubmit(){
window.location.replace('/yourin.asp');
return true;
}
</script>
</head>
<!-- -->
<form method="post" name="frmLogon" id="frmLogon">
<input type="submit" ...>
<input type="reset" ... >
</form>
<!-- -->
<script type="text/javascript">
document.forms('frmLogon').onsubmit = form_onsubmit;
</script>
<!-- -->

The idea was to remove the history. In other words to not allow Back to be used to return to
the logon page. This doesn't work the back in history is still available. Any suggestions how it can be done? Thanks.

--
George Hester
__________________________________
 
Reply With Quote
 
 
 
 
Lee
Guest
Posts: n/a
 
      10-17-2004
George Hester said:
>
>A user comes to the site and is presened with a Logon page. They enter =
>the correct info in the
>form and they are in. I am doing it like this:
>
><head>
><script type=3D"text/javascript">
>function form_onsubmit(){
> window.location.replace('/yourin.asp');
> return true;
>}


By returning true from the onSubmit handler, you're telling the
browser to replace the current page, and also to submit the form,
which also loads a new page (itself). Since you don't seem to
want to submit anything to the server, don't use a submit control.
Use a button with an onClick handler.

 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      10-17-2004
George Hester wrote:

> A user comes to the site and is presened with a Logon page. They enter the correct info in the
> form and they are in. I am doing it like this:
>
> <head>
> <script type="text/javascript">
> function form_onsubmit(){
> window.location.replace('/yourin.asp');
> return true;


return false;

> }
> </script>
> </head>
> <!-- -->
> <form method="post" name="frmLogon" id="frmLogon">


<form onsubmit="return form_onsubmit()".......>

> <input type="submit" ...>
> <input type="reset" ... >
> </form>
> <!-- -->
> <script type="text/javascript">
> document.forms('frmLogon').onsubmit = form_onsubmit;
> </script>


Get rid of that garbage script above.

> <!-- -->
>
> The idea was to remove the history.


Leave my history alone. But anyone that wants in your site can get in
directly. You are aware of that, right?

> In other words to not allow Back to be used to return to
> the logon page. This doesn't work the back in history is
> still available. Any suggestions how it can be done? Thanks.


Yes, and a more reliable way. Have the form submit to itself, and
redirect accordingly. All it takes now is to view source and go directly
to yourin.asp

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
 
Reply With Quote
 
George Hester
Guest
Posts: n/a
 
      10-17-2004

"Randy Webb" <> wrote in message news:84KdnWsOeNnXSe_cRVn-...
> George Hester wrote:
>
> > A user comes to the site and is presened with a Logon page. They enter the correct info in the
> > form and they are in. I am doing it like this:
> >
> > <head>
> > <script type="text/javascript">
> > function form_onsubmit(){
> > window.location.replace('/yourin.asp');
> > return true;

>
> return false;
>
> > }
> > </script>
> > </head>
> > <!-- -->
> > <form method="post" name="frmLogon" id="frmLogon">

>
> <form onsubmit="return form_onsubmit()".......>
>
> > <input type="submit" ...>
> > <input type="reset" ... >
> > </form>
> > <!-- -->
> > <script type="text/javascript">
> > document.forms('frmLogon').onsubmit = form_onsubmit;
> > </script>

>
> Get rid of that garbage script above.
>
> > <!-- -->
> >
> > The idea was to remove the history.

>
> Leave my history alone. But anyone that wants in your site can get in
> directly. You are aware of that, right?
>
> > In other words to not allow Back to be used to return to
> > the logon page. This doesn't work the back in history is
> > still available. Any suggestions how it can be done? Thanks.

>
> Yes, and a more reliable way. Have the form submit to itself, and
> redirect accordingly. All it takes now is to view source and go directly
> to yourin.asp
>
> --
> Randy
> comp.lang.javascript FAQ - http://jibbering.com/faq


Randy you cannot get into the site other then how I let you in. Guarenteed. You make think you are in but you are not.

As proof what is Osma's dream? You find that on the home page. If you can answer that then you are pretty good.

If you can answer it then you have asked for the user/pass which has no restrictions but without it I doubt it.

In any case thanks for the suggestions. I did do it using Server Side stuff.

--
George Hester
__________________________________
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing GPO setting from XP machine after removing from Domain Piet Slaghekke Computer Support 4 01-02-2007 08:58 PM
removing a namespace prefix and removing all attributes not in that same prefix Chris Chiasson XML 6 11-14-2006 05:08 PM
Need Help Removing Wireless Networking Taskbar Icon =?Utf-8?B?SmFtZXM=?= Wireless Networking 0 02-18-2005 08:32 PM
removing a machine from the domain =?Utf-8?B?SmVzc2UxMzU3OQ==?= Wireless Networking 1 02-16-2005 04:45 PM
Removing a network =?Utf-8?B?Ymx1Y2hlbHNraTAx?= Wireless Networking 1 09-12-2004 03:10 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57