Removing the History?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • George Hester

    #1

    Removing the History?

    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').ons ubmit = 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
    _______________ _______________ ____
  • Randy Webb

    #2
    Re: Removing the History?

    George Hester wrote:
    [color=blue]
    > 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;[/color]

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

    <form onsubmit="retur n form_onsubmit() ".......>
    [color=blue]
    > <input type="submit" ...>
    > <input type="reset" ... >
    > </form>
    > <!-- -->
    > <script type="text/javascript">
    > document.forms( 'frmLogon').ons ubmit = form_onsubmit;
    > </script>[/color]

    Get rid of that garbage script above.
    [color=blue]
    > <!-- -->
    >
    > The idea was to remove the history.[/color]

    Leave my history alone. But anyone that wants in your site can get in
    directly. You are aware of that, right?
    [color=blue]
    > 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.[/color]

    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.javas cript FAQ - http://jibbering.com/faq

    Comment

    • Lee

      #3
      Re: Removing the History?

      George Hester said:[color=blue]
      >
      >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;
      >}[/color]

      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.

      Comment

      • George Hester

        #4
        Re: Removing the History?


        "Randy Webb" <HikksNotAtHome @aol.com> wrote in message news:84KdnWsOeN nXSe_cRVn-3A@comcast.com. ..[color=blue]
        > George Hester wrote:
        > [color=green]
        > > 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;[/color]
        >
        > return false;
        > [color=green]
        > > }
        > > </script>
        > > </head>
        > > <!-- -->
        > > <form method="post" name="frmLogon" id="frmLogon">[/color]
        >
        > <form onsubmit="retur n form_onsubmit() ".......>
        > [color=green]
        > > <input type="submit" ...>
        > > <input type="reset" ... >
        > > </form>
        > > <!-- -->
        > > <script type="text/javascript">
        > > document.forms( 'frmLogon').ons ubmit = form_onsubmit;
        > > </script>[/color]
        >
        > Get rid of that garbage script above.
        > [color=green]
        > > <!-- -->
        > >
        > > The idea was to remove the history. [/color]
        >
        > Leave my history alone. But anyone that wants in your site can get in
        > directly. You are aware of that, right?
        > [color=green]
        > > 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.[/color]
        >
        > 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.javas cript FAQ - http://jibbering.com/faq[/color]

        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
        _______________ _______________ ____

        Comment

        Working...