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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating a database field.

Status
Not open for further replies.

Mutoti

Programmer
Sep 19, 2002
3
0
0
GB
Hi Guys,

I have a file, transactrions.asp which displays 20 records in a table per page. The last column in the table is a checkbox called "Done". When the loading the data I am making the TransactionID,which is unique the checkbox ID. This should make it easier to know which transaction to update. All I would like to do is update the "Done" field on the database for a specific transaction. Is there a way of having a "Silent" update, where I do not have to use forms. I was thinking along the lines of some JavaScript or similar.

Any help would be appreciated!

Cheers

Mutoti
 
A. You can pass information in the querystring which links to the next page. If the next page is an ASP script then you can process the information received in the querystring.

You can use event handlers such as onclick to move to the next page by running javascript with

document.location.href="nextpage.asp?info=done";

Again the next page processes the querystring.

B. You can put invisible forms with a multitude of hidden fields in them and submit them using a script with

<form action=&quot;nextpage.asp&quot; name=&quot;mySecretForm&quot;>
<input type=&quot;hidden&quot; name=&quot;info&quot; value=&quot;done&quot;>
</form>

<a href=&quot;javascript:markItDone();&quot;><img src=&quot;funny.gif&quot;></a>

<script>
function markItDone(){
document.mySecretForm.submit();
}
</script>

The script could be run by an event handler or an anchor tag around an img. Then process the form data in the next page.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top