submit button in asp

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

    submit button in asp

    hi all,


    *****short version of my problem****
    I used this code...

    <input type="button" name="btn1" onClick="docume nt.location.rel oad
    (true)" value="Reload">

    but it only works once! After I hit it once, all subsequent button hits
    just
    keep showing old data. Does anyone know what is wrong?

    ****long version of my problem****
    basically i have a text box that you can type something in and then hit
    submit. the data in the text box gets saved into an access database
    and I have the *action* parameter of the form set to the same asp page
    to bring up the page again, but I check and see if there is something
    stored in the database and it puts it back on the screen. (You end up
    with the same page that comes poplulated with the last value you typed
    into it except in my case I only get it to stick around once!)
    I have turn off a caching using the
    response.expire s = -1
    response.addhea der "pragma", "no-cache"
    ...etc...
    if anyone could help i would greatly appreciate!!!

  • mscir

    #2
    Re: submit button in asp

    Isabel wrote:[color=blue]
    > <input type="button" name="btn1" onClick="docume nt.location.rel oad
    > (true)" value="Reload">[/color]
    <snip>

    How about:


    window.location .reload(true);

    Or:


    onClick="histor y.go(0)"

    or:


    onClick="window .location.href= window.location .href"

    Comment

    • Isabel

      #3
      Re: submit button in asp

      Ok thanks acutally i have tried
      window.location .reload(true);
      window.history. go(0)
      and they dont work!

      but i haven't tried

      window.location .href=window.lo cation.href
      so i will try this first thing tomorrow.

      what i cant believe is that why is it so hard?
      forgeting the database..is there just a simple way that when you hit
      the submit button, the data in the text box remains? oh well, thanks
      for your help!

      Comment

      • Isabel

        #4
        Re: submit button in asp

        nope this doesn't work either!!
        window.location .href=window.lo cation.href

        Comment

        Working...