Print Page | Close Window

Update OR Delete - on same page

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=23116
Printed Date: 28 March 2026 at 11:23pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Update OR Delete - on same page
Posted By: mkbutler
Subject: Update OR Delete - on same page
Date Posted: 15 April 2007 at 4:29am

Is it possible to display information in fields on a form and have one button that updates and another button that deletes. I don't want to have to have seperate forms. Is this possible?

 

Thanks for all of the help you gurus have been! You are geniuses!




Replies:
Posted By: bootcom
Date Posted: 15 April 2007 at 10:46pm
In one word ... Javascript

You need to change the action of the form as demonstrated below.....

<form name="frmX" action="page.asp">

<input type="button" value="Update" onClick="document.frmX.action = 'page1.asp'; document.frmX.submit()" />

<input type="button" value="Delete" onClick="document.frmX.action='page2.asp'; document.frmX.submit()" />

</form>



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net