By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,287 Members | 1,544 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,287 IT Pros & Developers. It's quick & easy.

submit button in asp

P: n/a
hi all,
*****short version of my problem****
I used this code...

<input type="button" name="btn1" onClick="document.location.reload
(true)" value="Reload">

but it only works once! After I hit it once, all subsequent button hits
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.expires = -1
response.addheader "pragma", "no-cache"
if anyone could help i would greatly appreciate!!!

Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies

P: n/a
Isabel wrote:
<input type="button" name="btn1" onClick="document.location.reload
(true)" value="Reload">


How about:


onClick="window.location.href=window.location.href "
Jul 23 '05 #2

P: n/a
Ok thanks acutally i have tried
and they dont work!

but i haven't tried

so i will try this first thing tomorrow.

what i cant believe is that why is it so hard?
forgeting the 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!

Jul 23 '05 #3

P: n/a
nope this doesn't work either!!

Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.