This topic is locked

I wish to add a button in a edit mask

1/29/2008 4:04:50 PM
ASPRunnerPro General questions
T
totti_60 author

I have and edit mask where some time i need to send all the data inside by email to my cumster, but it is me that decide when, not every time i edit or add.

So I wish to create a button and then associate an event to the button, so that only when i click on this button email will be sended to cusmters.

J
Jane 1/30/2008

Antonio,
you can do the following:

  1. add custom event (Insert ASP code snippet option) on the Edit page on the Visual Editor tab.

    Here is a sample:
    Response.Write "<INPUT class=button type=button value=""&nbsp;&nbsp;send email&nbsp;&nbsp;"" onclick='window.location=""TableName_edit.asp?editid1=" & Request.QueryString("editid1") & "&mail=yes""'>"


2. then add this code to the Edit page: Before process event on the Events tab:

if Request.QueryString("mail")="yes" then

'send email here
'** Redirect to another page ****

Response.Redirect "TableName_list.asp"

end if