Form Button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Guys, I have created a page that will allow people to fill out information
and then submit it to a database. I have done this for adding and updating
of the tables. I will also do this to delete a record.

Now, I understand the submit push button and the reset push button. I don't
think I will use the reset push button. However, I would like to create a
cancel button. This button when clicked would return me to the main page, so
that no information is updated. I have used a hyper link to do that, but I
don't like the underline that comes with it.

So I'm wondering if there is something in the onclick category that will
allow me to say mimic the back button on the browser? Or is there some other
way of creating a cancel button that makes it look like the other push button?

Thanks for you help.
Terry
 
Hi Terry,

Try something like this
<input type="button" onclick="location.href='/mainpage.asp';"
value="Cancel">
or to go back 1 page
<input type="button" onclick="history.go(-1);" value="Cancel">
 
Thanks Jon

Jon Spivey said:
Hi Terry,

Try something like this
<input type="button" onclick="location.href='/mainpage.asp';"
value="Cancel">
or to go back 1 page
<input type="button" onclick="history.go(-1);" value="Cancel">
 
cance/reset = same thing. Just label the button "Cancel" instead of reset. The
reset button clears the form of all data, and doesn't submit anything.
 
I am currently trying to do the same thing. Create a form page that allow
people to fill out information and then submit it to a database. Having some
problems. I can't even get it to save the information to a simple file, yet
alone a database. Help please!
 
I am trying to do the same thing, allow people to fill out information and
then that information submit it to a database. I'm having trouble merely
saving the information to a text file, yet alone a database. Help please!
 
Reset button/cancel button are the same thing.

aharmon99 said:
I am currently trying to do the same thing. Create a form page that allow
people to fill out information and then submit it to a database. Having
some
problems. I can't even get it to save the information to a simple file,
yet
alone a database. Help please!
 
<input type="button" name="cancel" value="Cancel" onclick="history.go(-1);">

Is that what you mean?
 
Back
Top