<% name=Request.Form("name") comments=Request.Form("comments") submit_comment=Request.Form("submit_comment") email_check=ValidateEmail(email) 'Response.Write "email_check=" & email_check if len(comments)=0 and submit_comment="true" then errormsg="proper_comment" elseif len(name)=0 and submit_comment="true" then errormsg="proper_name" elseif len(comments)> 0 and len(name)> 0 and submit_comment="true" then currentlocation="publish" name = replace(name," ","%20") comments = replace(comments," ","%20") send_str="siteid=" & siteid & "&gbcomments=" & comments & "&gbname=" & name & "¤tlocation=" & currentlocation Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") xmlhttp.Open "POST", "http://" & hosting_internal_serverip & "/builder/gbform.asp", False xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" xmlhttp.send send_str If xmlhttp.Status = 200 Then ' Response from server was success xmlresponse=xmlhttp.responseText 'Response.Write xmlresponse end if errormsg="success" end if Function ValidateEmail(Expression) Dim objRegExp Set objRegExp = New RegExp objRegExp.Pattern = "^[\w\.-]+@[\w\.-]+\.[a-zA-Z]+$" ValidateEmail = objRegExp.Test(Expression) End Function %> <%if len(gbaddcommentsbtntitle)> 0 then%> <%=gbaddcommentsbtntitle%> <%else%> <%=htmltitleindex%> <%end if %>
<% if submit_comment<>"true" then%>
<%=gbcommentsfieldtitle%>
<%=gbnamefieldtitle%>

<%elseif submit_comment="true" and errormsg="proper_comment" then%>
Please provide " <%=gbcommentsfieldtitle%> "

<%elseif submit_comment="true" and errormsg="proper_name" then%>
Please provide " <%=gbnamefieldtitle%> "

<%elseif submit_comment="true" and errormsg="success" then%>
<%=gbsuccess%>

<%end if %>