Hello,
Im using ASP with VBScript.
At some point of the code of the application that Im making some changes, I need to get a confirmation from the user if he wants or not to send a confirmation e-mail for the action he performed.
Its simple, like this:
rs is just a recordset with some data on.
The thing is like this, I get the old Permission Denied error..
So I tryed like that, that I dont know is its going to work or not until someone uses this part of the application:
Moving the MsgBox to run on the client side works, but I dont belive if the 'send' variable created in the client-side code will be seen by the code runned server-side.
Anyone know some way to get this working?
Thank you very much in advance!
Im using ASP with VBScript.
At some point of the code of the application that Im making some changes, I need to get a confirmation from the user if he wants or not to send a confirmation e-mail for the action he performed.
Its simple, like this:
Code:
sendEmail = MsgBox("Send e-mail?",5,"Confirmation") if sendEmail = 6 then Set objmail = Server.CreateObject("CDONTS.NewMail") objmail.from = trim(rs("EMAIL")) objmail.Value("Reply-To") = trim(rs("EMAIL")) objmail.to = trim(rs("EMAIL_RESPONSAVEL"))&";"&trim(rs("EMAIL_GRUPO")) objmail.subject = trim(rs("EMAIL_ASSUNTO_FECHAMENTO_RESPONSAVEL"))&" "&trim(rs("NOME_TIPO_DOCUMENTO")) objmail.body = texto objmail.BodyFormat = 0 objmail.Importance = 2 objmail.MailFormat = 0 objmail.send set objmail = nothing end if
The thing is like this, I get the old Permission Denied error..
So I tryed like that, that I dont know is its going to work or not until someone uses this part of the application:
Code:
<SCRIPT language="VBScript"> sendEmail = MsgBox("Send e-mail?",5,"Confirmation") if sendEmail = 6 then send = true end if </SCRIPT> <% if send = true Set objmail = Server.CreateObject("CDONTS.NewMail") objmail.from = trim(rs("EMAIL")) objmail.Value("Reply-To") = trim(rs("EMAIL")) objmail.to = trim(rs("EMAIL_RESPONSAVEL"))&";"&trim(rs("EMAIL_GRUPO")) objmail.subject = trim(rs("EMAIL_ASSUNTO_FECHAMENTO_RESPONSAVEL"))&" "&trim(rs("NOME_TIPO_DOCUMENTO")) objmail.body = texto objmail.BodyFormat = 0 objmail.Importance = 2 objmail.MailFormat = 0 objmail.send set objmail = nothing end if %>
Anyone know some way to get this working?
Thank you very much in advance!
Comment