|
![]() |
# 1 |
הוסטסניון
|
קוד:
<%@ Language=JScript%> <% if(Request.form("from")() != "" ) { set myMail=CreateObject("CDO.Message") myMail.Subject="Sending email with CDO" myMail.From=Request.Form("from")() myMail.To="amirs_5@hotmail.com" myMail.TextBody=Request.Form("text")() myMail.Send set myMail=nothing } %> <form method="post" action="contact.asp"> email: <input type="text" name="from" /> <br /> text: <input type="text" name="text" /> <br /><br /> <input type="submit" value="Submit" /> </form> קוד:
Error Type: Microsoft JScript compilation (0x800A03EC) Expected ';' /contact.asp, line 5, column 4 set myMail=CreateObject("CDO.Message") ---^ לפי השיגאה ניסתי להחליף את ה SET ב VAR וזאת השגיאה החדשה : קוד:
Error Type: Microsoft JScript runtime (0x800A138F) Object expected /contact.asp, line 4
__________________
אימיל \ מסן : amirs91 [at] gmail.com Last edited by amirs_5; 15-09-06 at 13:02.. |
![]() |
![]() |
# 2 |
Fatal Error
|
ב Jscript אין דבר כזה set עבור אובייקטים אלא יש var. אתה צריך להחליט אם אתה כותב VBS או JS.
גם ב send אתה צריך להוסיף (). ומחיקת אובייקטים לא נעשית עם השוואה ל nothing אלא: קוד:
delete obj; obj = null;
__________________
eLad |
![]() |
![]() |
# 3 |
Fatal Error
|
קוד:
var myMail = Server.CreateObject("CDO.Message");
__________________
eLad |
![]() |
![]() |
חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים) | |
|
|