Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear button clicks

Status
Not open for further replies.

JimJx

Technical User
Joined
Feb 16, 2001
Messages
202
Location
US
This is a kinda strange question, I am sure....

I have a page that submits back to itself. There are 2 buttons on the page with a form, view and delete. If the user clicks the delete button after selecting which user to delete, the page reloads as it should, but it deletes the next user in the list also.

I think what I need to do is clear the button state, I have tried that but I can't seem to get it. Is there a way to clear the state of the buttons?

If you need the code to understand what I am talking about, please let me know.

Thanks!
Jim
 
You could possibly use the GET method instead of POST. POSTed form data is cached locally so if the same page is refreshed the data is resent, GET form data isn't.

- Kevin, perl coder unexceptional!
 
Hi Kevin,

I decided to rewrite the code. GET isn't something I really wanted to do in this case, so I just changed the way the script was handling the delete. For some reason, whoever wrote the script assigned a number - starting with 0 - to each line when the page was written. when there was a refresh, it was rewritten with 0 again being the first number.

I did a quick rewrite so it actually used the login name since each name is unique.

Thanks for the reply, I as always, appreciate you taking the tie to read and answer.

Jim
 
You're welcome, glad to hear you got it fixed. [smile]

- Kevin, perl coder unexceptional!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top