vozForums
Báo lỗi diễn đàn và theo dõi tình hình khắc phục.

Go Back   vozForums > Máy tính để bàn > Phần mềm > Phát triển Phần mềm


Reply
 
Thread Tools
  #1  
Old 22-08-2007, 10:24
hanachacha's Avatar
hanachacha hanachacha is offline
Senior Member
 
Join Date: 02-2007
Posts: 1,203
Bác nào có kinh nghệm thiết kế Web xin chỉ dẫn

Bác nào có kinh nghiệm về code web xin chỉ dẫn cho em làm cái trang Liên Hệ cái ạ, em làm nó toàn báo lỗi :

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

Technical Information (for support personnel)

* Error Type:
Microsoft JScript compilation (0x800A03EC)
Expected ';'
/Pages/Contact.asp, line 3, column 4
Dim Sender
---^

* Browser Type:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

* Page:
POST 102 bytes to /Pages/Contact.asp

* POST Data:
txtHoTen=&txtDiaChi=&txtDienThoai=&txtFax=&txtEmail=&txtTieuDe=&tarNoiDung=&btnS ubmit=G%E1%BB%9Fi+mail

* Time:
Wednesday, August 22, 2007, 10:20:03 AM

* More information:
Microsoft Support

đang tự học bằng sách nên còn ngu quá
Reply With Quote
  #2  
Old 22-08-2007, 10:27
logo logo is offline
Junior Member
 
Join Date: 08-2007
Posts: 2
Re: Bác nào có kinh nghệm thiết kế Web xin chỉ dẫn

Bác nào sành về web chỉ cho tui vài bước cơ bản để làm 1 trang web đi,web động cũng dc,
Reply With Quote
  #3  
Old 22-08-2007, 10:30
Kuang2's Avatar
Kuang2 Kuang2 is offline
Dẫn đao tự cung ...
 
Join Date: 07-2006
Location: Lâm Gia Trang
Posts: 5,763
Send a message via MSN to Kuang2 Send a message via Yahoo to Kuang2
Re: Bác nào có kinh nghệm thiết kế Web xin chỉ dẫn

line 3, column 4 -> debug đi, mình nghĩ là câu lệnh SQL có vấn đề rồi
Reply With Quote
  #4  
Old 22-08-2007, 10:31
foggyflute's Avatar
foggyflute foggyflute is offline
Mylove|1412
 
Join Date: 10-2006
Location: Gò Té - Sài Bông
Posts: 4,465
Send a message via Yahoo to foggyflute
Re: Bác nào có kinh nghệm thiết kế Web xin chỉ dẫn

Toàn xài PHP ko chơi ASP nên ko biết đc, nhưng đây là lỗi javascript thì phải.

@logo: bước cơ bản:
1/mua sách
2/làm theo sách
3/tự dựng những dự án nhỏ và down opensource về tham khảo
4/làm và làm để lấy kinh nghiệm

Cái gì cũng cần có trước có sau, nếu ko thì cứ opensource mà down về xai ko cần bíêt gì hết
Reply With Quote
  #5  
Old 22-08-2007, 11:01
hanachacha's Avatar
hanachacha hanachacha is offline
Senior Member
 
Join Date: 02-2007
Posts: 1,203
Re: Bác nào có kinh nghệm thiết kế Web xin chỉ dẫn

Quote:
Originally Posted by Kuang2
line 3, column 4 -> debug đi, mình nghĩ là câu lệnh SQL có vấn đề rồi
Chưa kết nối tới csdl thì lấy đâu ra SQL bác ơi, ở đây em mới chỉ thử gửi 1 email thui , cái dòng 3 cột 4 là "Dim Sender" em chỉ khai báo cái biến Sender thui.
Đây là toàn bộ source của cái trang này - tên file là contact.asp, mong các bác chỉ cho em biết chỗ sai :

-----------------------------------------------------------------
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>

<%
Dim Sender
Dim EmailSender
Dim Address
Dim Fax
Dim Tel
Dim Subject
Dim Content
Dim objMail

Sender=trim(Request.Form("txtHoTen"))
EmailSender=trim(Request.Form("txtEmail"))
Address=trim(Request.Form("txtDiaChi"))
Fax=trim(Request.Form("txtFax"))
Tel=trim(Request.Form("txtDienThoai"))
Subject=trim(Request.Form("txtTieuDe"))
Content=Replace(Request.Form("tarNoiDung"),vbNewLine, "")

Set objMail=CreateObject("CDONTS.NewMail") //khởi tạo đối tượng CDONTS
objMail.From=EmailSender
objMail.To="hanachacha_yan@yahoo.com"
objMail.MailFormat=0
objMail.BodyFormat=0
objMail.Subject=Subject
objMail.Body=Content
objMail.Importance=1 //Mức độ ưu tiên, có cá giá trị 0,1
objMail.Send()
Set objMail=Nothing //Giải phóng đối tượng
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<script language="JavaScript">
function check_form()
{
strErr="";
if (frmLienHe.txtHoTen.value=="" || frmLienHe.txtEmail.value=="" || frmLienHe.tarNoiDung.value=="")
strErr=strErr +"\nVui lòng điền đầy đủ các thông tin có dấu (*).";
//strerr=strerr +"\nPlease fill in blanks with full details(*).";
if (strErr!="")
{
alert(strErr);
//alert(strerr2);
return false;
}
}
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Liên Hệ</title>
<style type="text/css">
<!--
body {
background-color: #FFFFFF;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
</head>

<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="70" style="background-color:#EFEFEF "></td>
<td width="1"bgcolor="#009999"></td>
<td valign="top">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td height="117" colspan="3" valign="top" align="center"><!--#include file="Top.htm"--></td>
</tr>
<tr>
<!--Menu Left-->
<td width="25%" ><!--#include file="Left.htm"--></td>
<!--Body-->
<td width="50%" align="left" valign="top" style="margin: 10px 0px 10px 0px;">
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="font-size:12px">
<tr>
<td height="60" valign="middle"><font color=red>(*)</font> Thông tin bắt buộc</td>
</tr>
<tr>
<td valign="top">
<form name="frmLienHe" method="post" action="contact.asp" onSubmit="return check_form();">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100" height="30" valign="top">&nbsp;Họ và Tên : <font color=red>(*)</font></td>
<td colspan="2" valign="top"><input type="text" name="txtHoTen" ></td>
</tr>
<tr>
<td height="30" valign="top">&nbsp;Địa Chỉ :</td>
<td colspan="2" valign="top"><input type="text" name="txtDiaChi"></td>
</tr>
<tr>
<td height="30" valign="top">&nbsp;Số Điện Thoại :</td>
<td colspan="2" valign="top"><input type="text" name="txtDienThoai"></td>
</tr>
<tr>
<td height="30" valign="top">&nbsp;Số Fax :</td>
<td colspan="2" valign="top"><input type="text" name="txtFax"></td>
</tr>
<tr>
<td height="30" valign="top">&nbsp;Địa Chỉ Mail : <font color=red>(*)</font></td>
<td colspan="2" valign="top"><input type="text" name="txtEmail"></td>
</tr>
<tr>
<td height="30" valign="top">&nbsp;Tiêu Đề :</td>
<td colspan="2" valign="top"><input type="text" name="txtTieuDe"></td>
</tr>
<tr>
<td valign="top">&nbsp;Nội Dung :&nbsp; <font color=red>(*)</font></td>
<td colspan="2" valign="top"><textarea name="tarNoiDung" rows="8" cols="35"></textarea></td>
</tr>
<tr>
<td vAlign=top><div align="center"></div></td>
<td width="21%" vAlign=top><div align="left"><input type="submit" name="btnSubmit" value="Gởi mail" ></div></td>
<td width="54%" vAlign=top><div align="left"><input type="reset" name="btnReset" value=" Xóa "></div></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td>
<!--Menu Right-->
<td width="25%" rowspan="2" align="right" valign="top"><!--#include file="Right.htm"--></td>
</tr>
<tr>
<td height="1" colspan="3" valign="top" bgcolor="#CCCCCC"></td>
</tr>
<tr>
<td height="100" colspan="3" valign="top" bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td height="25" colspan="3" valign="top"><!--#include file="Bottom.htm"--></td>
</tr>
</table>
</td>
<td width="1" bgcolor="#009999"></td>
<td width="70" style="background-color:#EFEFEF "></td>
</tr>
</table>
</body>
</html>
----------------------------------------------------------------
bỏ cái đoạn tô đỏ thì nó chạy

Last edited by hanachacha; 22-08-2007 at 11:04.
Reply With Quote
  #6  
Old 22-08-2007, 11:57
Lugiavn's Avatar
Lugiavn Lugiavn is offline
Senior Member
 
Join Date: 08-2006
Posts: 722
Re: Bác nào có kinh nghệm thiết kế Web xin chỉ dẫn

iem ko rõ, bác thử so sánh vớicái này xem (chạy tốt), iem làm hồi xưa
Code:
<% if request.querystring("action")="ok" then
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.From = request.form("ten")&"<"&request.form("emailgoi")&">"
objCDOMail.To = request.form("email")
objCDOMail.BodyFormat = 0
objCDOMail.MailFormat = 0
objCDOMail.Subject =request.form("tieude")
noidung= Replace(Request.Form("body"), vbNewLine, "<br>")
noidung= "....To "&request.form("toname")&" <br>"&noidung&"<center><br>--------------------------<br> [^_^] <a href=http://sex.com>http://sex.com</a> [^_^]</center>"
objCDOMail.Body = noidung
objCDOMail.Importance = 1
objCDOMail.Send
Set objCDOMail = Nothing%>
  <center>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<p align="center">Okie!
<p align="center">The Mail Was Sent.
</td> 
</tr> 
</table> 
  </center>
<%else%> 
<form method="POST" action="?go=sendmail&action=ok"> 
<div align="center"> 
<center> 
<table border="1" cellspacing="0" cellpadding="0" style="font-weight: bold; font-family: Times New Roman" > 
<tr> 
<td width="36%">Nick nguời gởi</td> 
<td width="71%"><input type="text" name="ten" size="41" class="text" value="<%=request.querystring("ten")%>"></td> 
</tr> 
<tr> 
<td width="36%">Email nguời gởi</td> 
<td width="71%"><input type="text" name="emailgoi" size="41" class="text" value="<%=request.querystring("emailgoi")%>"></td> 
</tr> 
<tr> 
<td width="36%">Nick ngu?i nhận</td>   
<td width="71%"><input type="text" name="toname" size="41" class="text" value="<%=request.querystring("toname")%>"></td> 
</tr> 
<tr> 
<td width="36%">Email người nhận</td> 
<td width="71%"><input type="text" name="email" size="41" class="text" value="<%=request.querystring("Email")%>"></td> 
</tr>
<tr> 
<td width="36%">Tiêu dề thu</td> 
<td width="71%"><input type="text" name="tieude" size="41" class="text" value="<%=request.querystring("tieude")%>"></td> 
</tr>
<tr> 
<td width="36%" valign="top">Nội dung thư 
<p align="center">&nbsp;</p> 
</td> 
<td width="71%"><textarea rows="7" name="body" cols="32" class="text"><%=request.querystring("body")%></textarea></td> 
</tr> 
</table> 
</center> 
</div> 
<p align="center"><img border="0" src="tulieu/bt.gif" width="50" height="1"><input type="submit" value=" Send " class="but"><img border="0" src="tulieu/bt.gif" width="50" height="1"><input type="reset" value=" Clear " class="but"><img border="0" src="tulieu/bt.gif" width="50" height="1"></p> 
</form> 
<%end if%>

Last edited by Lugiavn; 22-08-2007 at 12:03.
Reply With Quote
  #7  
Old 22-08-2007, 12:21
Kuang2's Avatar
Kuang2 Kuang2 is offline
Dẫn đao tự cung ...
 
Join Date: 07-2006
Location: Lâm Gia Trang
Posts: 5,763
Send a message via MSN to Kuang2 Send a message via Yahoo to Kuang2
Re: Bác nào có kinh nghệm thiết kế Web xin chỉ dẫn

mình éo biết asp, nhìn rối tinh rối mù
Reply With Quote
  #8  
Old 22-08-2007, 12:27
longhorn's Avatar
longhorn longhorn is online now
Senior Member
 
Join Date: 07-2006
Location: Hà Nội City
Posts: 6,176
Send a message via Yahoo to longhorn Send a message via Skype™ to longhorn
Re: Bác nào có kinh nghệm thiết kế Web xin chỉ dẫn

thưa với bro là Dim được sử dụng trong VBScript, bro set JScript thế kia thì nó chẳng báo lỗi à
Reply With Quote
  #9  
Old 22-08-2007, 13:02
hanachacha's Avatar
hanachacha hanachacha is offline
Senior Member
 
Join Date: 02-2007
Posts: 1,203
Re: Bác nào có kinh nghệm thiết kế Web xin chỉ dẫn

Quote:
Originally Posted by longhorn
thưa với bro là Dim được sử dụng trong VBScript, bro set JScript thế kia thì nó chẳng báo lỗi à
OMG ko để ý cái vụ thằng DW tự động thêm cái dòng này <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>

~ sau khi xóa bỏ dòng đó thì nó báo lỗi khác " Invalid class string " tại dòng "Set objMail=Server.CreateObject("CDONTS.NewMail") "//khởi tạo đối tượng CDONTS
hình như nó báo lỗi ko tạo được object mới thì phải
Reply With Quote
  #10  
Old 22-08-2007, 13:08
longhorn's Avatar
longhorn longhorn is online now
Senior Member
 
Join Date: 07-2006
Location: Hà Nội City
Posts: 6,176
Send a message via Yahoo to longhorn Send a message via Skype™ to longhorn
Re: Bác nào có kinh nghệm thiết kế Web xin chỉ dẫn

lâu lâu không đụng asp, bro cho mình hỏi đối tượng CDONTS là đối tượng gì nhỉ
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump





All times are GMT +7. The time now is 23:29.


Steam Powered by vBulletin® 0.1 pre-alpha
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.