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!

Msgbox - Permission Denied? 1

Status
Not open for further replies.

GDX

Programmer
Jun 4, 2000
186
0
0
US
Anyone know why I might get permission denied in this couple line of codes? It sends the message but no msgbox comes up!

<Script Language = VBScript>
<%
If Len(Request.form(&quot;Email&quot;))=>1 then
Set ObjMail = Server.CreateObject(&quot;CDONTS.NewMail&quot;)
ObjMail.Subject = &quot;Mail From [vslink.net] - Press Release&quot;
ObjMail.From = &quot;Anon@vslink.net&quot;
ObjMail.To =&quot;gd@vslink.net&quot;
ObjMail.Body = &quot;The following message was sent via vslink.net/main.asp&quot; &amp; chr(13) &amp; chr(13) &amp; &quot;Sender: &quot; &amp; request.form(&quot;Email&quot;) &amp; chr(13) &amp; &quot;Subject: &quot; &amp; request.form (&quot;Subject&quot;) &amp; chr(13) &amp; &quot;Message:&quot; &amp; chr(13) &amp; request.form(&quot;Data&quot;)
ObjMail.Send
Msgbox &quot;Your mail has been sent sucessfully!&quot;
else
end if
%>

</Script> Gordon R. Durgha
gd@vslink.net
 
Your asp code will execute on the server, its not possible to display messagebox on the client side.
If you want to display message to the user use any of the following methods

METHOD-1

To display on the browser

response.write (&quot;YOUR MESSAGE&quot;)

METHOD-2

To display as message box

<Script language=javascript>
alert(&quot;<%Response.write(&quot;YOUR MESSAGE&quot;)%>&quot;)
</script> M.Krishna Reddy
VisualSoft Technologies Ltd.
Hyderabad, India -500 016

e-mail : mckreddy@dev.vsofti.stph.net

url :
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top