
現在ASPをもとにWebサイトを作成しています。
「Microsoft VBScript コンパイラーエラー(0X800A03F6) 'End'がありません。」と出るのですが、どこが原因なのでしょうか?
<%@ LANGUAGE="VBSCRIPT" %>
<%
' ####################
' ### データ送信用 ###
' ####################
StrUsername = Request.Form("username")
StrUruby = Request.Form("uruby")
StrDatofbirth = Request.Form("dayofbirth")
StrEmail1 = Request.Form("email1")
StrEmail2 = Request.Form("email2")
StrGender = Request.Form("gender")
StrPostnumber = Request.Form("postnumber")
StrAddress = Request.Form("address")
StrTel1 = Request.Form("tel1")
StrTel2 = Request.Form("tel2")
StrSchool = Request.Form("school")
StrFaculty = Request.Form("faculty")
StrDepartment = Request.Form("department")
StrSurvey = Request.Form("survey")
StrComment = Request.Form("comment")
StrDesiredjobtype = Request.Form("desiredjobtype")
if username = "" then
username = "未入力"
end if
if uruby = "" then
uruby = "未入力"
end if
if dayofbirth = "" then
dayofbirth = "未入力"
end if
if email1 = "" then
email1 = "未入力"
end if
if email2 = "" then
email2 = "未入力"
end if
if gender = "" then
gender = "未入力"
end if
if postnumber = "" then
postnumber = "未入力"
end if
if address = "" then
address = "未入力"
end if
if tel1 = "" then
tel1 = "未入力"
end if
if tel2 = "" then
tel2 = "未入力"
end if
if faculty = "" then
faculty = "未入力"
end if
if department = "" then
department = "未入力"
end if
if survey = "" then
survey = "未入力"
end if
if comment = "" then
comment = "未入力"
end if
if desiredjobtype = "" then
desiredjobtype = "未入力"
<!-- ERRORカウンタの初期化
errnum = ""
' ###
' ### sqlインジェクション対策 ###
' ###]
if errnum <> "" Then
Response.Redirect "http://localhost/tesut/chkerr.asp?errnum="+ errnum
End If
<!--パラメータ
LIST = Array(username,uruby,dayofbirth,email1,email2,gender,postnumber,address,tel1,tel2,school,faculty,department,survey,comment,desiredjobtype)
<!--検出項目(SQLコマンドで使用される特殊記号の検出)
CHECK_1 = Array("<",">","&","'","+","-","*","/","%",";","--","(",")","\","""",",")
<!--ハンドリング要素
ERROR = Array("A","B","C","D")
For j = 0 to UBound(LIST)
tmpData = UCase(LIST(j))
For i = 0 to UBound(CHECK_1)
If Instr(tmpData,CHECK_1(i)) > 0 Then
errnum = errnum + ERROR(j)
Exit For
End If
Next
Next
if errnum <> "" Then
Response.Redirect "http://localhost/tesut/chkerr.asp?errnum="+ errnum
End If
<!-- POSTで遅れないのでセションに保存
Session.Contents("username") = username
Session.Contents("uruby") = uruby
Session.Contents("dayofbirth") = dayofbirth
Session.Contents("email1") = email1
Session.Contents("email2") = email2
Session.Contents("gender") = gender
Session.Contents("postnumber") = postnumber
Session.Contents("address") = address
Session.Contents("tel1") = tel1
Session.Contents("tel2") = tel2
Session.Contents("school") = school
Session.Contents("faculty") = faculty
Session.Contents("department") = deaprtment
Session.Contents("survey") = survey
Session.Contents("comment") = comment
Session.Contents("desiredjobtype") = deairedjobtype
Response.Redirect "http://localhost/tesut/check.asp"
<!-- xssの記号検出処理
Function XssChk(Str)
err = 0
If Instr(Str,"<") > 0 Then
err = err + 1
End If
If Instr(Str,">") > 0 Then
err = err + 1
End If
If Instr(Str,"&") > 0 Then
err = err + 1
End If
If Instr(Str,"'") > 0 Then
err = err + 1
End If
If Instr(Str,"""") > 0 Then
err = err + 1
End If
XssChk = err
End Function
%>
No.2ベストアンサー
- 回答日時:
if desiredjobtype = "" then
desiredjobtype = "未入力"
のあとにEnd Ifが足りないのでは?
チラッと見ただけなので問題が本当にそこなのか、
またそこだけなのか自信がありませんけど。
あとコメントって
「<!--」じゃなくて「--」か「'」じゃなかったっけ?
それから日本語コメントで「POSTで遅れないので」じゃなくて「POSTで送れないので」。
No.1
- 回答日時:
> if desiredjobtype = "" then
> desiredjobtype = "未入力"
>
をよく見直しましょう。
というか、
> <!-- ERRORカウンタの初期化
の HTML コメント風のものが閉じてないように思うんですが、これはこれでいいんでしょうか? > ASP に詳しい諸兄殿
お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!
似たような質問が見つかりました
- Excel(エクセル) 2つのVBAを一緒にしたら機能しなくなりました(エクセル) 7 2022/06/02 12:41
- Visual Basic(VBA) InputBoxでキャンセルボタンを押したらファイル自体を閉じたい 3 2022/07/23 17:52
- Visual Basic(VBA) VBAの繰り返し処理について教えてください。 3 2022/08/02 13:21
- Visual Basic(VBA) VBA Userformで一部別シートに転記がしたいのですが 2 2023/05/24 13:08
- Visual Basic(VBA) ファイル全てを .xlsm に変更したところ、プログラムが途中で落ちてしまっています 17 2022/12/07 12:03
- Visual Basic(VBA) 動きっぱなしです。止め方とプロシージャの間違いを教えて下さい! 5 2022/08/15 23:08
- Visual Basic(VBA) excel2021で実行できないマクロ。どこを直したらいいのか 2 2022/03/28 03:40
- Visual Basic(VBA) ExcelのVBAコードについて教えてください。 1 2023/02/02 09:25
- Visual Basic(VBA) [Excel VBA] このコードでは行の挿入や行の消去をすると13のエラーが出てしまう。 3 2022/12/09 00:29
- Excel(エクセル) エクセルVBAでオブジェクトが必要です 2 2022/09/10 16:37
関連するカテゴリからQ&Aを探す
おすすめ情報
デイリーランキングこのカテゴリの人気デイリーQ&Aランキング
-
テキストボックス入力を半角英...
-
テキストフィールドに入力した...
-
onChangeの使い方について教え...
-
テキストボックスを無効にする...
-
テキストエリアをクリックした...
-
文末の改行コードを削除したい
-
submit後、同じ入力欄に戻らせ...
-
日付入力欄の表示形式を自動的...
-
条件により、リンク先に画面遷...
-
ソースコードは下の共有コード...
-
return trueとreturn falseの用...
-
オークションサイト一括検索サ...
-
javascript作成してます。ラジ...
-
selectで選ばれた値を別ページ...
-
プルダウン 項目が多いので先頭...
-
スマホのフォームでのselect複...
-
onchangeイベントを強制的に発...
-
value内に変数を入れたい
-
HTMLのテキストボックスへのド...
-
hiddenのvalueの値を変えたい
マンスリーランキングこのカテゴリの人気マンスリーQ&Aランキング
-
onClickとsubmitの処理順序
-
フォームの値が0だったら空白...
-
javascriptで入力フォームが空...
-
文末の改行コードを削除したい
-
JSPとJavaScriptの連携について...
-
日付入力欄の表示形式を自動的...
-
条件により、リンク先に画面遷...
-
Acrobat Java Scriptについて教...
-
PDFフォームで条件つき金額を表...
-
VBScript
-
テキストボックスを無効にする...
-
イベント発生時に入力待ち状態...
-
ラジオボタンによるフォームの...
-
Webブラウザにてページのりロー...
-
テキストボックス入力を半角英...
-
お願いします!Javascriptで月...
-
入力モード 自動 切り替え
-
strutsのhtmlタグのfileについて
-
JQueryで2つのテキストフィー...
-
onChange()メソッド
おすすめ情報