I have a piece of code in one of my web applications that has been written with ASP Classic.
Unfortunately, some part of the code is VBScript and does not run in FireFox. I need to change it to JavaScript, but I'm not familiar with JavaScript.
Can anyone help me?
This is the piece of code in VBScript. I need to have a JavaScript version of the following code:
Unfortunately, some part of the code is VBScript and does not run in FireFox. I need to change it to JavaScript, but I'm not familiar with JavaScript.
Can anyone help me?
This is the piece of code in VBScript. I need to have a JavaScript version of the following code:
Code:
<%
Response.Write "<SCRIPT LANGUAGE=vbscript Event=OnClick For=btnConf>" & vbCrLf _
& "If f1.txtName.value = " & """""" & "Then" & vbCrLf _
& "MsgBox " & """Empty Field for the Name!""" & ",vbExclamation," & """Error""" & vbCrLf _
& "f1.txtName.select" & vbCrLf _
& "ElseIf f1.txtMail.value = " & """""" & "Then" & vbCrLf _
& "MsgBox " & """Please Enter Your E-mail!""" & ",vbExclamation," & """Error""" & vbCrLf _
& "f1.txtMail.select" & vbCrLf _
& "ElseIf f1.txtPhone.value = " & """""" & "Or Not IsNumeric(f1.txtPhone.value) Then" & vbCrLf _
& "MsgBox " & """Please Enter Your Phone Number!""" & ",vbExclamation," & """Error""" & vbCrLf _
& "f1.txtPhone.select" & vbCrLf _
& "Else" & vbCrLf _
& "f1.action = " & """SaveOrder.asp?" & Request.QueryString & """" & vbCrLf _
& "f1.submit" & vbCrLf _
& "End If" & vbCrLf _
& "</SCRIPT>"
If Session("NotComplete") <> "" Then
Response.Write "<SCRIPT LANGUAGE=vbscript Event=OnLoad For=Window>" & vbCrLf _
& "MsgBox " & """" & Session("NotComplete") & """" & ",vbExclamation," & """Error""" & vbCrLf _
& "</SCRIPT>"
End If
%>
Comment