Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

GET works fine but post doesn't Work!!!!

Posted on 2006-06-02
44
Medium Priority
?
556 Views
Last Modified: 2008-03-17

Hi experts,

In my ASP page, there is a form when I put its method to be get I change the call the variables by request.QueryString("V1") it works fine.

When I change only the method to be post  I change the call to be request.form("V1") it doesn't work!!!

Why this could happen?
0
Comment
Question by:ALNMOO
  • 19
  • 5
  • 4
  • +5
41 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 16818337
Can you post a sample ?
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16818376
the code is very huge and complicated.

0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 16818395
I only meant a sample of the form declaration and a field, to demonstrate how you are currently attempting to retrieve the value.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Author Comment

by:ALNMOO
ID: 16818442

The following code when I am using post and doesn't work:

response.Write(request.Form("GO"))

<form  name="frm" method="post" >
<table>
<tr>
  <td></td>
   <td><input class="testFiled" class="Butto" type="submit" name="GO"value="Update">  </td>
    <td></td>
    <td> <input class="testFiled"  class="Butto" type="reset" value="Reset"></td>
    <td></td>
</tr>
</table>
</form>
--------------------------------------------------------
The following code when I am using get and it works fine:

response.Write(request.QueryString("GO"))

<form  name="frm" method="get" >
<table>
<tr>
  <td></td>
   <td><input class="testFiled" class="Butto" type="submit" name="GO"value="Update">  </td>
    <td></td>
    <td> <input class="testFiled"  class="Butto" type="reset" value="Reset"></td>
    <td></td>
</tr>
</table>
</form>
0
 
LVL 9

Expert Comment

by:danataylor
ID: 16818558
You need to define what you want the form to do when submitted:

<form  name="frm" method="post" action="NameOfThisModule.asp">
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16818581
but the default value of acction is the same page and this is what I want.

I am surprised why it works with get while it doesn't work with post!!!
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16818596
sory :-)

I mean action.

and to be sure I tested with action set to be same page and was same.

0
 
LVL 9

Expert Comment

by:danataylor
ID: 16818685
The only thing else I can think of is to remove the outer parenthesis in the response.Write.  I don't think that is the problem but I don't use parens in VBScript objects.  If parens are not allowed I would think you would have gotten an error, though.

response.Write request.Form("GO")
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 16818742
Try writing out the entire Form and seeing what you get:

    Response.Write Request.Form
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16818954
Response.Write Request.Form

no repsonse as if it not there!!
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16818958
I removed the outer parenthesis and it is same!
0
 
LVL 22

Expert Comment

by:WMIF
ID: 16819095
try assigning the id attribute as well as the name attribute.

<form  name="frm" method="post" >
<table>
<tr>
  <td></td>
   <td><input class="testFiled" class="Butto" type="submit" name="GO" id="GO" value="Update">  </td>
    <td></td>
    <td> <input class="testFiled"  class="Butto" type="reset" value="Reset"></td>
    <td></td>
</tr>
</table>
</form>
--------------------------------------------------------
The following code when I am using get and it works fine:

response.Write(request.QueryString("GO"))

<form  name="frm" method="get" >
<table>
<tr>
  <td></td>
   <td><input class="testFiled" class="Butto" type="submit" name="GO" id="GO" value="Update">  </td>
    <td></td>
    <td> <input class="testFiled"  class="Butto" type="reset" value="Reset"></td>
    <td></td>
</tr>
</table>
</form>
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16819115
the id attribute  doesn't solve it
0
 
LVL 9

Expert Comment

by:danataylor
ID: 16819169
Try this and see if you at least get a value.  If you do them dig into the two class definitions (testFiled & Butto) and see if there is something wrong with them.

<input class='Button' type='submit' name='GO' value='UpDate'>"
0
 
LVL 22

Expert Comment

by:WMIF
ID: 16819221
response.Write("querystring value: " & request.QueryString("GO") & ":end")

response.Write("post value: " & request.form("GO") & ":end")


try them like this and lets make sure that the line is getting processed.  you should be getting the text without a value.
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16819223
I rremoved the calss tag but still same, no output
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16819244
I tried response.Write("post value: " & request.form("GO") & ":end")

Yes the line is processed.

Is there any possibility that this error from IIS?
0
 
LVL 22

Expert Comment

by:WMIF
ID: 16819292
what if you add a text box with a value.  does it show that textbox's value?
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16819346
yes
0
 
LVL 3

Expert Comment

by:CubeRoot
ID: 16819593
As a test..the following code works perfectly on my server.

<%
If Request("Go") <> "" Then
    Response.Write "Submit Value = " & Request("Go") & "<BR><BR>"
End If
%>

<FORM method='post'>
    <INPUT type='submit' name='Go' value='Update'>
    <INPUT type='submit' name='Go' value='Add New'>
</FORM>
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16819693
I just  test your code and doesn't work
0
 
LVL 13

Expert Comment

by:jrram
ID: 16819732
>> ALNMOO

Everyone here has thrown out the most basic and probable solutions...

Are you posting to the same page or a different page?  And I know you said your code is huge, but if it doesn't have any database connectivity stuff in it, can you zip it up and put it on your server so we can all download it.  

Maybe its something else before the submit control gets processed that's causing it to get out of whack.
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16819780
The probelm is my page connected to our DC and has LDAP query. also it is interinal site.

0
 
LVL 3

Expert Comment

by:CubeRoot
ID: 16819839
He's got a more serious problem if my simple form coding isn't working for him. When I run it I and click Update then the response.write prints Update if I like add New it responses with Add New. This seems more like a browser problem or an IIS problem more than coding problem.
0
 
LVL 13

Expert Comment

by:jrram
ID: 16819854
Ok, so the sum it up,

You can process all the fields on your form regardless of what method you use (GET or POST), except for the submit button named 'GO'?  This button can only be processed if the method=GET

1) Can you try re-naming the button to something other than 'GO' to see if it works? Try:

<input type="submit" name="submit" value="Update" />  
0
 
LVL 22

Expert Comment

by:WMIF
ID: 16820029
try sticking this in there too to see if we get a result for this.

response.write("METHOD: " & Request.ServerVariables("REQUEST_METHOD"))
0
 
LVL 20

Expert Comment

by:Gawai
ID: 16821988
but your code works fine for me.i tried this way :

<%
response.Write(request.Form("GO"))
%>


<form  name="frm" method="post" >
<table>
<tr>
  <td></td>
   <td><input class="testFiled" class="Butto" type="submit" name="GO"value="Update">  </td>
    <td></td>
    <td> <input class="testFiled"  class="Butto" type="reset" value="Reset"></td>
    <td></td>
</tr>
</table>
</form>


when i click on submit button it shows correct result:

Update

[ Update ]  [Reset]  <--- Buttons


0
 
LVL 20

Expert Comment

by:Gawai
ID: 16821994
i mean when i click on Update button it shows correct result:

Update
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16822051
jrram

correction, with post I cann't process any field not only GO.

I tried a different names for this fileds but still, same error
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16822069
This is very strange!!!

It is working now without touching any thing!!!!

It seems that it is IE or IIS problem!

any one faced this problem before? any why this may happen?
0
 
LVL 13

Expert Comment

by:jrram
ID: 16822186
I've never encountered this particular situation ALNMOO, but I have run into other situations where some of my code was perfectly fine and wouldn't work.  In those situations, I typically just restarted IIS and it resolved the problems.

I'm not a Microsoft basher, but we all know some of their products can be quirky sometimes ;-)
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16822222
But the problem solved without even restart IIS!!
0
 
LVL 1

Expert Comment

by:paltareq
ID: 16827125
if ur method is POST <form action="test.asp" method="POST" >
u want to use request.Form("value")

else if ur method is GET <form action="test.asp" method="GET" >
request.QueryString("value"))

if u dont know what method u use ?? u can make
>>>  request("value")  <<<<  

this the best if u dont know what the method u used
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16831321
dear all,


still I didn't discover why this probelm happened?

some times it works and some times doesn't work
0
 
LVL 20

Expert Comment

by:Gawai
ID: 16831514
reinstall IIS/PWS. hope it wil fix your problem
0
 
LVL 22

Expert Comment

by:WMIF
ID: 16834582
lets narrow it down.  try using a different pc to post these values.  do you get the same results?
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16842141
yes,

I tried from another PC, and I get same probelm
0
 
LVL 3

Expert Comment

by:CubeRoot
ID: 16842369
If you haven't already. Create a new file on your server and put my coding above in it and see if it functions or fails. If it fails then you obviously have a server installation problem. I did some research on the Net and didn't find any references to this type of problem. I would recommend removing IIS, then re-installing it. Make sure you have a good backup and consider this a learning experience. :)

This could very much be a sign of a larger problem with IIS. I wouldn't just trying working around the problem as you don't know how this is effecting other applications on your site.
0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16849624
This the code that do the problem,


============


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Update Your Information</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<!-- #include file="conn.asp" -->
<script language="javascript">
function hide(){
document.frm.hr.value="outsource";
document.getElementById("t1").style.display="none";


}
function view(){
document.frm.hr.value="";
document.getElementById("t1").style.display="block";

}
</script>
<body bgcolor="#1C4299">
<!-- #include file="header.txt" -->
<%
'================== // =================
session("LogonName") = "0021112"
'========= Query LDAP  ===========
'Searching in AD using the logon name & LDAP
IF session("LogonName") <> "" Then
Const ADS_SCOPE_SUBTREE = 3

Set objConnection = CreateObject("ADODB.Connection")
Set objCommand =   CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
objCommand.CommandText = _
    "SELECT ADsPath FROM 'LDAP://dc=alrajhi,dc=bank' WHERE objectCategory='user' " & _
        "AND sAMAccountName='" & session("LogonName") & "'"
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst
Do Until objRecordSet.EOF
    'response.Write(objRecordSet.Fields("ADsPath").Value)
      dir = objRecordSet.Fields("ADsPath").Value
      Set objOU = GetObject(dir)
      objRecordSet.MoveNext
Loop
      ELSE
      response.Redirect("default.asp")
      END IF
      
      
'========== Reset Redirect =======

IF request.Form("reset") = "Reset" THEN
      response.Redirect("default.asp")
END IF


'========= Validate Data =========
if  request.form("GO")      = "Update" THEN
      un                  = session("LogonName")
      una                  = request.Form("userName")
      ext                  = request.Form("ext")
      hr                  = request.Form("hr")
      office             = request.Form("office")
      dept             = request.Form("dept")
      titl            = request.Form("Title")
      OldName            = request.Form("OldName")
      OldOffice      = request.Form("OldOffice")
      OldDept            = request.Form("OldDept")
      OldTitle      = request.Form("OldTitle")
      OldExt            = request.Form("OldExt")
      RE                  = request.Form("RE")
      
      
      
      
      '====== error Code ======
rro = "00000000000000"
' 1."10000000000000" => not chars or .  - in the name
' 2."01000000000000" => more than 30 chars in the name
' 3."00100000000000" => less than 4 digits in phone number
' 4."00010000000000" => more than 10 digits in phone number
' 5."00001000000000" => not digits in phone number
' 6."00000100000000" => No Dept name
' 7."00000010000000" => Only chars in Dept name
' 8."00000001000000" => no more 10 digits and less than 3 digits office
' 9."00000000100000" => You have to insert HR number
' 10."00000000010000"=> Only digits in HR number
' 11."00000000001000"=> only digits in Office number
' 12."00000000000100"=> You have to fill your name
' 13."00000000000010"=> Title contains only charchters
' 14."00000000000001"=> ??
'------- check the user name ------

IF Len(una) < 4 THEN
      orError(12)
END IF
f = 0      
For x = 1 To Len(una)
       y      =      ASC(Mid(una, x, 1))
  If not (y = 32 or y = 45 or y = 46 or (y >64 and y < 91) or (y >96 and y < 123))  Then
              f = 1
         End If
  Next
IF f = 1 THEN
      orError(1)
END IF



      
IF Len(una) > 30 THEN
orError(2)
END IF
'=========================================


IF Len(ext) < 4 THEN
      orError(3)
END IF
IF Len(ext) > 10 THEN
      orError(4)
END IF

IF not IsNumeric(ext) THEN
      orError(5)
END IF
' =========================
IF Len(dept) < 4 THEN
orError(6)
END IF

f1 = 0      
For x = 1 To Len(dept)
       y      =      ASC(Mid(dept, x, 1))
  If not (y = 32 or (y >64 and y < 91) or (y >96 and y < 123))  Then
              f1 = 1
         End If
  Next
IF f1 = 1 THEN
orError(7)
END IF

'=======================================
f1 = 0      
For x = 1 To Len(titl)
       y      =      ASC(Mid(titl, x, 1))
  If not (y = 32 or (y >64 and y < 91) or (y >96 and y < 123))  Then
              f1 = 1
         End If
  Next
IF f1 = 1 THEN
orError(13)
END IF
' ======================================

IF RE = "yes" THEN
      IF hr = "" THEN
            orError(9)
            ELSE      
            IF not IsNumeric(hr) THEN
                  orError(10)
            END IF
      END IF
END IF
'======================================
IF (Len(office) < 3) or (Len(office) > 10)THEN
      orError(8)
END IF
f2 = 0      
For x = 1 To Len(office)
       y      =      ASC(Mid(office, x, 1))
  If (y < 48) or (y > 57)  Then
              f2 = 1
         End If
  Next
IF f2 = 1 THEN
      orError(11)
END IF
'==================================




'================= functions ======
function orError (b)
tmp = ""
For x = 1 To len(rro)
       y = Mid(rro, x, 1)
      if x = b THEN
            tmp = tmp + "1"
      ELSE
            tmp = tmp + y
     End If
  Next  
  rro = tmp
 END function

function IsError (d)
IsError = false
      y = Mid(rro, d, 1)
      if y = "1" THEN
            IsError = true
     End If
 END function
 
IF not (IsError(1) or IsError(2) or IsError(3) or IsError(4) or IsError(5) or IsError(6) or IsError(7) or IsError(8) or IsError(9) or IsError(10) or IsError(11) or IsError(12) or IsError(13)) THEN
      session("una")                  = una
      session("ext")                  = ext
      session("hr")                  = hr
      session("office")            = office
      session("dept")                  = dept
      session("titl")                  = titl
      session("OldName")            = OldName
      session("OldOffice")      = OldOffice
      session("OldDept")            = OldDept
      session("OldTitle")            = OldTitle
      session("OldExt")            = OldExt
      session("RE")                  = RE
      response.Redirect("update.asp")
      
END IF


ELSE

un                  = session("LogonName")
una                  = objOU.displayName
ext                  = objOU.telephoneNumber
hr                  = request.Form("hr")
office             = objOU.physicalDeliveryOfficeName
dept             = objOU.department
titl            = objOU.Title
OldName            = request.Form("OldName")
OldOffice      = request.Form("OldOffice")
OldDept            = request.Form("OldDept")
OldTitle      = request.Form("OldTitle")
OldExt            = request.Form("OldExt")
RE                  = request.Form("RE")


END IF





%>
<div align="center">
<fieldset title="Update Your Information">
<legend class="legend_title">Update Your Information &#1581;&#1583;&#1579; &#1605;&#1593;&#1604;&#1608;&#1605;&#1575;&#1578;&#1603;</legend>
<form action="index.asp" name="frm" method="post" >
<table>
      <tr>
            <td align="left" class="titleEffects">Logon Name:</td>
            <td></td>
            <td class="titleEffects" align="center"><%= session("LogonName")%></td>
            <td></td>
            <td align="right" dir="rtl" class="titleEffects">&#1585;&#1605;&#1586; &#1575;&#1604;&#1588;&#1576;&#1603;&#1577;:</td>
      </tr>

      <tr>
            <td align="left" class="titleEffects">User Name:</td>
            <td></td>
            <td class="titleEffects" align="center"><input name="userName" maxlength="30" <%IF IsError(12) or IsError(1) or IsError(2) THEN response.Write("class='wrongField'") ELSE response.Write("class='testFiled'") END IF %> type="text" value="<%=una%>"></td>
            <td><%IF IsError(12) or IsError(1) or IsError(2) THEN response.Write("<img src='images/wrong.gif' border='0'>") END IF %></td>
            
            <td align="right" dir="rtl" class="titleEffects">&#1575;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1578;&#1582;&#1583;&#1605;:</td>
      </tr>

      <tr>
            <td align="left" class="titleEffects">Office:</td>
            <td></td>
            <td><input name="office" maxlength="10" <%IF IsError(11) or IsError(8) THEN response.Write("class='wrongField'") ELSE response.Write("class='testFiled'") END IF %> type="text" value="<%=office%>"></td>
            <td><%IF IsError(11) or IsError(8) THEN response.Write("<img src='images/wrong.gif' border='0'>") END IF %></td>
            <td align="right" dir="rtl" class="titleEffects">&#1585;&#1602;&#1605; &#1575;&#1604;&#1605;&#1603;&#1578;&#1576;:</td>
      </tr>
      <tr>
            <td align="left" class="titleEffects">Department:</td>
            <td></td>
            <td><input <%IF IsError(6) or IsError(7) THEN response.Write("class='wrongField'") ELSE response.Write("class='testFiled'") END IF %> maxlength="50" name="dept"  type="text" value="<%=dept%>"></td>
            <td><%IF IsError(6) or IsError(7) THEN response.Write("<img src='images/wrong.gif' border='0'>") END IF %></td>
            <td align="right" dir="rtl" class="titleEffects">&#1575;&#1604;&#1573;&#1583;&#1575;&#1585;&#1577;:</td>
      </tr>
      <tr>
            <td align="left" class="titleEffects">Title(Optional):</td>
            <td></td>
            <td><input <%IF IsError(13) THEN response.Write("class='wrongField'") ELSE response.Write("class='testFiled'") END IF %> maxlength="30" name="Title"  type="text" value="<%=titl%>"></td>
            <td><%IF IsError(13) THEN response.Write("<img src='images/wrong.gif' border='0'>") END IF %></td>
            <td align="right" dir="rtl" class="titleEffects">&#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#1575;&#1604;&#1608;&#1592;&#1610;&#1601;&#1610;: (&#1575;&#1582;&#1578;&#1610;&#1575;&#1585;&#1610;)</td>
      </tr>
            
      <tr>
            <td align="left" class="titleEffects">Telephone Number:</td>
            <td></td>
            <td><input  <%IF IsError(5) or IsError(3) or IsError(4) THEN response.Write("class='wrongField'") ELSE response.Write("class='testFiled'") END IF %> maxlength="10" name="ext" maxlength="10"  type="text" value="<%=ext%>"></td>
            <td><%IF IsError(5) or IsError(3) or IsError(4) THEN response.Write("<img src='images/wrong.gif' border='0'>") END IF %></td>
            <td align="right" dir="rtl" class="titleEffects">&#1585;&#1602;&#1605; &#1575;&#1604;&#1607;&#1575;&#1578;&#1601;:</td>
      </tr>
      <tr>
            <td align="left" class="titleEffects">Are you Alrajhi Employee?</td>
            <td></td>
            <td><input type="radio" name="RE" value="yes" onClick="view()" checked><font class="titleEffects">Yes/&#1606;&#1593;&#1605;</font>
                  <input type="radio" name="RE" value="no" onClick="hide()"><font class="titleEffects">NO/&#1604;&#1575;</font></td>
            <td></td>
            <td align="right" dir="rtl" class="titleEffects">&#1607;&#1604; &#1571;&#1606;&#1578; &#1605;&#1608;&#1592;&#1601; &#1601;&#1610; &#1575;&#1604;&#1605;&#1589;&#1585;&#1601;&#1567;</td>
      </tr>
      <tr id="t1">
            <td align="left" class="titleEffects">HR Number:</td>
            <td></td>
            <td><input <%IF IsError(9) or IsError(10)THEN response.Write("class='wrongField'") ELSE response.Write("class='testFiled'") END IF %> maxlength="10" name="hr" type="text"></td>
            <td><%IF IsError(9) or IsError(10) THEN response.Write("<img src='images/wrong.gif' border='0'>") END IF %></td>
            <td align="right" dir="rtl" class="titleEffects">&#1575;&#1604;&#1585;&#1602;&#1605; &#1575;&#1604;&#1608;&#1592;&#1610;&#1601;&#1610;:</td>
      </tr>
      
            <tr>
            <td>
            </td>
                  <td>
                  <input class="testFiled" class="Butto" type="submit" name="GO" value="Update" id="GO">  </td>
                  <td>
            </td>
                  <td>
             <input class="testFiled" name="reset"  class="Butto" type="submit" value="Reset">
              </td>
                  <td>
            </td>
      </tr>
</table>

<input type="hidden" name="OldName" value="<%=objOU.displayName%>">
<input type="hidden" name="OldOffice" value="<%=objOU.physicalDeliveryOfficeName %>">
<input type="hidden" name="OldDept" value="<%=objOU.department%>">
<input type="hidden" name="OldTitle" value="<%=objOU.Title%>">
<input type="hidden" name="OldExt" value="<%=objOU.telephoneNumber%>">
<input type="hidden" name="" value="<%=objOU.telephoneNumber %>">

</form>
<br>
</fieldset>
<br>
<%
IF rro <> "00000000000000" THEN
'response.Write(IsError(13) & "<BR>" & titl)
%>
<table width="90%" border="1" bordercolor="#1C4299">
      <tr>
            <td align="left" bordercolor="#FFFFFF"  bgcolor="#FF0000" class="rror" width="50%">
      <ol>
            <% IF  IsError(12) THEN %><li><font class="rror">User name cann't be empty</font></li> <% END IF%>
            <% IF  IsError(1) THEN  %><li><font class="rror">User name can contain only characters,'.' and '-'</font></li><% END IF%>
            <% IF  IsError(2) THEN %><li><font class="rror">User name cann't be more than 30 characters</font></li><% END IF%>
            <% IF  IsError(8) THEN  %><li><font class="rror">Office number has to be between 10 digits and 4 digits</font></li><% END IF%>
            <% IF  IsError(11) THEN %><li><font class="rror">Office number has to be digits only</font></li><% END IF%>
            <% IF  IsError(6) THEN %><li><font class="rror">Department name cann't be empty</font></li><% END IF%>
            <% IF  IsError(7) THEN %><li><font class="rror">Department name can contain only characters</font></li><% END IF%>
            <% IF  IsError(13) THEN %><li><font class="rror">The Title can contain only characters</font></li><% END IF%>
            <% IF  IsError(5) THEN %><li><font class="rror">Phone number can contain only digits</font></li><% END IF%>
            <% IF  IsError(3) THEN %><li><font class="rror">Phone number cann't be less than 4 digits </font></li><% END IF%>
            <% IF  IsError(4) THEN %><li><font class="rror">Phone number cann't be more than 10 digits</font></li><% END IF%>
            <% IF  IsError(9) THEN %><li><font class="rror">HR number is required if you Alrajhi Bank Employee</font></li><% END IF%>
            <% IF  IsError(10) THEN %><li><font class="rror">HR number has to be digits only</font></li><% END IF%>
      </ol>
            </td>
            <td align="right" dir="rtl" bordercolor="#FFFFFF"  bgcolor="#FF0000" class="rror" width="50%">
      <ol>
            <% IF  IsError(12) THEN %><li><font class="rror">&#1610;&#1580;&#1576; &#1578;&#1593;&#1576;&#1574;&#1577; &#1575;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1578;&#1582;&#1583;&#1605;</font></li><% END IF%>
            <% IF  IsError(1) THEN %><li><font class="rror">&#1610;&#1605;&#1603;&#1606; &#1571;&#1606; &#1610;&#1581;&#1578;&#1608;&#1610; &#1575;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1578;&#1582;&#1583;&#1605; &#1593;&#1604;&#1609; &#1571;&#1581;&#1585;&#1601; &#1573;&#1606;&#1580;&#1604;&#1610;&#1586;&#1610;&#1577; &#1571;&#1608; ‘.‘ &#1571;&#1608; ‘-‘</font></li><% END IF%>
            <% IF  IsError(2) THEN %><li><font class="rror">&#1604;&#1575; &#1610;&#1605;&#1603;&#1606; &#1571;&#1606; &#1610;&#1586;&#1610;&#1583; &#1575;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1578;&#1582;&#1583;&#1605; &#1593;&#1606; 30 &#1581;&#1585;&#1601;</font></li><% END IF%>
            <% IF  IsError(8) THEN %><li><font class="rror">&#1585;&#1602;&#1605; &#1575;&#1604;&#1605;&#1603;&#1578;&#1576; &#1610;&#1580;&#1576; &#1571;&#1606; &#1604;&#1575; &#1610;&#1602;&#1604; &#1593;&#1606; &#1571;&#1585;&#1576;&#1593;&#1577; &#1571;&#1585;&#1602;&#1575;&#1605;</font></li><% END IF%>
            <% IF  IsError(11) THEN %><li><font class="rror">&#1585;&#1602;&#1605; &#1575;&#1604;&#1605;&#1603;&#1578;&#1576; &#1610;&#1578;&#1603;&#1608;&#1606; &#1605;&#1606; &#1571;&#1585;&#1602;&#1575;&#1605; &#1601;&#1602;&#1591;</font></li><% END IF%>
            <% IF  IsError(6) THEN %><li><font class="rror">&#1610;&#1580;&#1576; &#1578;&#1593;&#1576;&#1574;&#1577; &#1581;&#1602;&#1604; &#1575;&#1604;&#1573;&#1583;&#1575;&#1585;&#1577; </font></li><% END IF%>
            <% IF  IsError(7) THEN %><li><font class="rror">&#1610;&#1580;&#1576; &#1571;&#1606; &#1610;&#1603;&#1578;&#1576; &#1575;&#1587;&#1605; &#1575;&#1604;&#1573;&#1583;&#1575;&#1585;&#1577; &#1576;&#1575;&#1604;&#1571;&#1581;&#1585;&#1601; &#1575;&#1604;&#1573;&#1606;&#1580;&#1604;&#1610;&#1586;&#1610;&#1577;</font></li><% END IF%>
            <% IF  IsError(13) THEN %><li><font class="rror">&#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#1575;&#1604;&#1608;&#1592;&#1610;&#1601;&#1610; &#1610;&#1580;&#1576; &#1571;&#1606; &#1610;&#1578;&#1603;&#1608;&#1606; &#1605;&#1606; &#1571;&#1581;&#1585;&#1601; &#1573;&#1606;&#1580;&#1604;&#1610;&#1586;&#1610;&#1577; &#1601;&#1602;&#1591;.</font></li><% END IF%>
            <% IF  IsError(5) THEN %><li><font class="rror">&#1585;&#1602;&#1605; &#1575;&#1604;&#1607;&#1575;&#1578;&#1601; &#1610;&#1578;&#1603;&#1608;&#1606; &#1605;&#1606; &#1571;&#1585;&#1602;&#1575;&#1605; &#1601;&#1602;&#1591;</font></li><% END IF%>
            <% IF  IsError(3) THEN %><li><font class="rror">&#1610;&#1580;&#1576; &#1571;&#1606; &#1610;&#1603;&#1608;&#1606; &#1585;&#1602;&#1605; &#1575;&#1604;&#1607;&#1575;&#1578;&#1601; &#1571;&#1603;&#1579;&#1585; &#1605;&#1606; &#1579;&#1604;&#1575;&#1579;&#1577; &#1571;&#1585;&#1602;&#1575;&#1605; </font></li><% END IF%>
            <% IF  IsError(4) THEN %><li><font class="rror">&#1604;&#1575; &#1610;&#1605;&#1603;&#1606; &#1571;&#1606; &#1610;&#1586;&#1610;&#1583; &#1585;&#1602;&#1605; &#1575;&#1604;&#1607;&#1575;&#1578;&#1601; &#1593;&#1606; &#1593;&#1588;&#1585;&#1577; &#1571;&#1585;&#1602;&#1575;&#1605;</font></li><% END IF%>
            <% IF  IsError(9) THEN %><li><font class="rror">&#1573;&#1584;&#1575; &#1603;&#1606;&#1578; &#1605;&#1606; &#1605;&#1608;&#1592;&#1601;&#1610; &#1575;&#1604;&#1585;&#1575;&#1580;&#1581;&#1610;&#1548; &#1601;&#1610;&#1580;&#1576; &#1578;&#1593;&#1576;&#1574;&#1577; &#1575;&#1604;&#1585;&#1602;&#1605; &#1575;&#1604;&#1608;&#1592;&#1610;&#1601;&#1610;</font></li><% END IF%>
            <% IF  IsError(10) THEN %><li><font class="rror">&#1575;&#1604;&#1585;&#1602;&#1605; &#1575;&#1604;&#1608;&#1592;&#1610;&#1601;&#1610; &#1610;&#1578;&#1603;&#1608;&#1606; &#1605;&#1606; &#1571;&#1585;&#1602;&#1575;&#1605; &#1601;&#1602;&#1591;</font></li><% END IF%>
            
            
      </ol>

            </td>
<%
' 1."10000000000000" => not chars or .  - in the name
' 2."01000000000000" => more than 30 chars in the name
' 3."00100000000000"      => less than 4 digits in phone number
' 4."00010000000000" => more than 10 digits in phone number
' 5."00001000000000" => not digits in phone number
' 6."00000100000000" => No Dept name
' 7."00000010000000" => Only chars in Dept name
' 8."00000001000000" => no more 10 digits and less than 3 digits office
' 9."00000000100000" => You have to insert HR number
' 10."00000000010000" => Only digits in HR number
' 11."00000000001000" => only digits in Office number
' 12."00000000000100" => You have to fill your name
' 13."00000000000010" => Title contains only charchters
' 14."00000000000001" => ??
%>            
      </tr>
</table>

<%
END IF

%>
</div>


</body>
</html>



0
 
LVL 7

Author Comment

by:ALNMOO
ID: 16849636
CubeRoot


I tested your code in another page and it worked fine
0
 
LVL 3

Accepted Solution

by:
CubeRoot earned 2000 total points
ID: 16853914
I've been tweaking your code and it seems to work with a few tweaks. My main problem is I can't access your LDAP so I had to pretty much bypass that part of code. I didn't see any obvious problems that were keeping the form from working but I cleaned up the code and made some tweaks. You'll need to go over it and make the necessary changes for it to function for you again.

If I had time I would complete incase the form using my Output routine along with the javascript. I find it much easier to debug when the whole page functions more like an application.

As a the coding below stands I was able to use update or reset and it seems to work the way you would expect.



<%
Output "<!DOCTYPE html public '-//w3c//dtd html 4.01 transitional//en' 'http://www.w3.org/tr/html4/loose.dtd'>"
Output "<HTML>"
Output "  <HEAD>"
Output "    <TITLE>Update Your Information</TITLE>"
Output "    <META http-equiv='Content-Type' content='text/html; charset=windows-1256'>"
Output "    <LINK href='style.css' rel='stylesheet' type='text/css'>"
Output "  </HEAD>"

' ================================================================================
' === JavaScript Routines                                                      ===
' ================================================================================
%>
<SCRIPT language='javascript'>

function hide(){
document.frm.hr.value="outsource";
document.getElementById("t1").style.display="none";
}

function view(){
document.frm.hr.value="";
document.getElementById("t1").style.display="block";
}

</SCRIPT>
<%
' ================================================================================
' === Functions                                                                ===
' == Functions should return a value, orError (b) isn't written correctly      ===
' ================================================================================
Function orError (b)
      tmp = ""
      For x = 1 To Len(rro)
            y = Mid(rro, x, 1)
            If x = b Then
                  tmp = tmp + "1"
            Else
                  tmp = tmp + y
            End If
      Next  
      rro = tmp
End Function

Function IsError (d)
      IsError = false
      y = Mid(rro, d, 1)
      If y = "1" Then IsError = True
End Function

Sub Output(sOutput) ' Makes code easier to read if viewing source from browser
      Response.Write sOutput & Chr(13) & Chr(10) ' CrLf
End Sub

' ================================================================================
'Output "<!-- #include file='conn.asp' -->"
Output "<BODY bgcolor='#1C4299'>"
'Output "<!-- #include file="header.txt" -->"

' ================================================================================
' == Find User in LDAP                                                         ===
' ================================================================================
Session("LogonName") = "0021112" ' ========= Query LDAP  ===========
Session("LogonName") = "" ' *** Used To Skip LDAP Query

'Searching in AD using the logon name & LDAP
If Session("LogonName") <> "" Then
      Const ADS_SCOPE_SUBTREE = 3
      Set objConnection = CreateObject("ADODB.Connection")
      Set objCommand =   CreateObject("ADODB.Command")
      objConnection.Provider = "ADsDSOObject"
      objConnection.Open "Active Directory Provider"
      Set objCommand.ActiveConnection = objConnection
      objCommand.Properties("Page Size") = 1000
      objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
      objCommand.CommandText = _
            "SELECT ADsPath FROM 'LDAP://dc=alrajhi,dc=bank' WHERE objectCategory='user' " & _
                  "AND sAMAccountName='" & Session("LogonName") & "'"
      Set objRecordSet = objCommand.Execute
      If Not objRecordSet.EOF Then objRecordSet.MoveFirst ' Added Check For No Record Found
      
      Do Until objRecordSet.EOF ' Is There going to be more than 1 match?
            ' Response.Write objRecordSet.Fields("ADsPath").Value
            dir = objRecordSet.Fields("ADsPath").Value
            Set objOU = GetObject(dir)
            objRecordSet.MoveNext
      Loop
Else
      'Response.Redirect("default.asp")
End If
     
' ================================================================================
If Request.Form("reset") = "Reset" Then ' Reset Redirect ' *** If Reset is a button of type reset Then it will never post.
     Response.Redirect("ee-form.asp")   ' Reset buttons only resets a form to its status before any information has been changed.
End If ' I changed the target file to ee-form.asp for testing purposes.

'========= Validate Data =========
If  Request.Form("GO") = "Update" Then
     un        = Session("LogonName")
     una       = Request.Form("userName")
     ext       = Request.Form("ext")
     hr        = Request.Form("hr")
     office    = Request.Form("office")
     dept      = Request.Form("dept")
     titl      = Request.Form("Title")
     OldName   = Request.Form("OldName")
     OldOffice = Request.Form("OldOffice")
     OldDept   = Request.Form("OldDept")
     OldTitle  = Request.Form("OldTitle")
     OldExt    = Request.Form("OldExt")
     RE        = Request.Form("RE")
     
      ' ================================================================================
      ' === Error Codes                                                              ===
      ' ================================================================================
      ' 1."10000000000000" => not chars or .  - in the name
      ' 2."01000000000000" => more than 30 chars in the name
      ' 3."00100000000000" => less than 4 digits in phone number
      ' 4."00010000000000" => more than 10 digits in phone number
      ' 5."00001000000000" => not digits in phone number
      ' 6."00000100000000" => No Dept name
      ' 7."00000010000000" => Only chars in Dept name
      ' 8."00000001000000" => no more 10 digits and less than 3 digits office
      ' 9."00000000100000" => You have to insert HR number
      ' 10."00000000010000"=> Only digits in HR number
      ' 11."00000000001000"=> only digits in Office number
      ' 12."00000000000100"=> You have to fill your name
      ' 13."00000000000010"=> Title contains only charchters
      ' 14."00000000000001"=> ??
      rro = "00000000000000"

      ' ================================================================================
      If Len(una) < 4 Then orError(12) ' ------- check the user name ------
      f = 0    
      For X = 1 To Len(una)
            y = ASC(Mid(una, X, 1))
            If Not (y = 32 or y = 45 or y = 46 or (y >64 and y < 91) or (y >96 and y < 123))  Then f = 1
      Next
      If f = 1 Then orError(1)

      If Len(una) > 30 Then orError(2)

      ' ================================================================================
      If Len(ext) < 4 Then orError(3)
      If Len(ext) > 10 Then orError(4)
      If Not IsNumeric(ext) Then orError(5)

      ' ================================================================================
      If Len(dept) < 4 Then orError(6)
      f1 = 0    
      For X = 1 To Len(dept)
            y = ASC(Mid(dept, X, 1))
            If Not (y = 32 or (y >64 and y < 91) or (y >96 and y < 123))  Then f1 = 1
      Next
      If f1 = 1 Then orError(7)

      ' ================================================================================
      f1 = 0    
      For X = 1 To Len(titl)
            y = ASC(Mid(titl, X, 1))
      If Not (y = 32 or (y >64 and y < 91) or (y >96 and y < 123))  Then
                        f1 = 1
                  End If
      Next
      If f1 = 1 Then orError(13)

      ' ================================================================================
      If RE = "yes" Then
            If hr = "" Then orError(9)
      Else
            If Not IsNumeric(hr) Then orError(10)
      End If

      ' ================================================================================
      If (Len(office) < 3) or (Len(office) > 10)Then orError(8)
      f2 = 0    
      For X = 1 To Len(office)
            y = ASC(Mid(office, X, 1))
            If (y < 48) or (y > 57)  Then f2 = 1
      Next
      If f2 = 1 Then orError(11)

      ' ================================================================================
      If Not (IsError(1) or IsError(2) or IsError(3) or IsError(4) or IsError(5) or _
            IsError(6) or IsError(7) or IsError(8) or IsError(9) or IsError(10) or _
                  IsError(11) or IsError(12) or IsError(13)) Then
            Session("una")       = una
            Session("ext")       = ext
            Session("hr")        = hr
            Session("office")    = office
            Session("dept")      = dept
            Session("titl")      = titl
            Session("OldName")   = OldName
            Session("OldOffice") = OldOffice
            Session("OldDept")   = OldDept
            Session("OldTitle")  = OldTitle
            Session("OldExt")    = OldExt
            Session("RE")        = RE
            Response.Redirect("update.asp")
      End If
Else
      un        = Session("LogonName")
'      una       = objOU.displayName
'      ext       = objOU.telephoneNumber
      hr        = Request.Form("hr")
'      office    = objOU.physicalDeliveryOfficeName
'      dept      = objOU.department
'      titl      = objOU.Title
      OldName   = Request.Form("OldName")
      OldOffice = Request.Form("OldOffice")
      OldDept   = Request.Form("OldDept")
      OldTitle  = Request.Form("OldTitle")
      OldExt    = Request.Form("OldExt")
      RE        = Request.Form("RE")
End If

' ================================================================================

%>
<DIV align="center">
<FIELDSET title="Update Your Information">
<LEGEND class="legend_title">Update Your Information &#1581;&#1583;&#1579; &#1605;&#1593;&#1604;&#1608;&#1605;&#1575;&#1578;&#1603;</LEGEND>
<FORM action="ee-form.asp" name="frm" method="post" id="Form1"> ' I changed the target file to ee-form.asp for testing purposes.
<TABLE id="Table1">
     <TR>
          <TD align="left" class="titleEffects">Logon Name:</TD>
          <TD></TD>
          <TD class="titleEffects" align="center"><%= session("LogonName")%></TD>
          <TD></TD>
          <TD align="right" dir="rtl" class="titleEffects">&#1585;&#1605;&#1586; &#1575;&#1604;&#1588;&#1576;&#1603;&#1577;:</TD>
     </TR>

     <TR>
          <TD align="left" class="titleEffects">User Name:</TD>
          <TD></TD>
          <TD class="titleEffects" align="center"><INPUT name="userName" maxlength="30" <%If IsError(12) or IsError(1) or IsError(2) Then Output("class='wrongField'") ELSE Output("class='testFiled'") End If %> type="text" value="<%=una%>" id="Text1"></TD>
          <TD><%If IsError(12) or IsError(1) or IsError(2) Then Output("<img src='images/wrong.gif' border='0'>") End If %></TD>
         
          <TD align="right" dir="rtl" class="titleEffects">&#1575;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1578;&#1582;&#1583;&#1605;:</TD>
     </TR>

     <TR>
          <TD align="left" class="titleEffects">Office:</TD>
          <TD></TD>
          <TD><INPUT name="office" maxlength="10" <%If IsError(11) or IsError(8) Then Output("class='wrongField'") ELSE Output("class='testFiled'") End If %> type="text" value="<%=office%>" id="Text2"></TD>
          <TD><%If IsError(11) or IsError(8) Then Output("<img src='images/wrong.gif' border='0'>") End If %></TD>
          <TD align="right" dir="rtl" class="titleEffects">&#1585;&#1602;&#1605; &#1575;&#1604;&#1605;&#1603;&#1578;&#1576;:</TD>
     </TR>
     <TR>
          <TD align="left" class="titleEffects">Department:</TD>
          <TD></TD>
          <TD><INPUT <%If IsError(6) or IsError(7) Then Output("class='wrongField'") ELSE Output("class='testFiled'") End If %> maxlength="50" name="dept"  type="text" value="<%=dept%>" id="Text3"></TD>
          <TD><%If IsError(6) or IsError(7) Then Output("<img src='images/wrong.gif' border='0'>") End If %></TD>
          <TD align="right" dir="rtl" class="titleEffects">&#1575;&#1604;&#1573;&#1583;&#1575;&#1585;&#1577;:</TD>
     </TR>
     <TR>
          <TD align="left" class="titleEffects">Title(Optional):</TD>
          <TD></TD>
          <TD><INPUT <%If IsError(13) Then Output("class='wrongField'") ELSE Output("class='testFiled'") End If %> maxlength="30" name="Title"  type="text" value="<%=titl%>" id="Text4"></TD>
          <TD><%If IsError(13) Then Output("<img src='images/wrong.gif' border='0'>") End If %></TD>
          <TD align="right" dir="rtl" class="titleEffects">&#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#1575;&#1604;&#1608;&#1592;&#1610;&#1601;&#1610;: (&#1575;&#1582;&#1578;&#1610;&#1575;&#1585;&#1610;)</TD>
     </TR>
         
     <TR>
          <TD align="left" class="titleEffects">Telephone Number:</TD>
          <TD></TD>
          <TD><INPUT  <%If IsError(5) or IsError(3) or IsError(4) Then Output("class='wrongField'") ELSE Output("class='testFiled'") End If %> maxlength="10" name="ext" maxlength="10"  type="text" value="<%=ext%>" id="Text5"></TD>
          <TD><%If IsError(5) or IsError(3) or IsError(4) Then Output("<img src='images/wrong.gif' border='0'>") End If %></TD>
          <TD align="right" dir="rtl" class="titleEffects">&#1585;&#1602;&#1605; &#1575;&#1604;&#1607;&#1575;&#1578;&#1601;:</TD>
     </TR>
     <TR>
          <TD align="left" class="titleEffects">Are you Alrajhi Employee?</TD>
          <TD></TD>
          <TD><INPUT type="radio" name="RE" value="yes" onclick="view()" checked id="radio1"><FONT class="titleEffects">Yes/&#1606;&#1593;&#1605;</FONT>
               <INPUT type="radio" name="RE" value="no" onclick="hide()" id="Radio2"><FONT class="titleEffects">NO/&#1604;&#1575;</FONT></TD>
          <TD></TD>
          <TD align="right" dir="rtl" class="titleEffects">&#1607;&#1604; &#1571;&#1606;&#1578; &#1605;&#1608;&#1592;&#1601; &#1601;&#1610; &#1575;&#1604;&#1605;&#1589;&#1585;&#1601;&#1567;</TD>
     </TR>
     <TR id="t1">
          <TD align="left" class="titleEffects">HR Number:</TD>
          <TD></TD>
          <TD><INPUT <%If IsError(9) or IsError(10)Then Output("class='wrongField'") ELSE Output("class='testFiled'") End If %> maxlength="10" name="hr" type="text" id="Text6"></TD>
          <TD><%If IsError(9) or IsError(10) Then Output("<img src='images/wrong.gif' border='0'>") End If %></TD>
          <TD align="right" dir="rtl" class="titleEffects">&#1575;&#1604;&#1585;&#1602;&#1605; &#1575;&#1604;&#1608;&#1592;&#1610;&#1601;&#1610;:</TD>
     </TR>
     
          <TR>
          <TD>
          </TD>
               <TD>
               <INPUT class="testFiled" class="Butto" type="submit" name="GO" value="Update" id="GO">  </TD>
               <TD>
          </TD>
               <TD>
           <INPUT class="testFiled" name="reset"  class="Butto" type="submit" value="Reset" id="Submit1">
            </TD>
               <TD>
          </TD>
     </TR>
</TABLE>

<INPUT type="hidden" name="OldName" value="<%'=objOU.displayName%>" id="Hidden1">
<INPUT type="hidden" name="OldOffice" value="<%'=objOU.physicalDeliveryOfficeName %>" id="Hidden2">
<INPUT type="hidden" name="OldDept" value="<%'=objOU.department%>" id="Hidden3">
<INPUT type="hidden" name="OldTitle" value="<%'=objOU.Title%>" id="Hidden4">
<INPUT type="hidden" name="OldExt" value="<%'=objOU.telephoneNumber%>" id="Hidden5">
<INPUT type="hidden" name="" value="<%'=objOU.telephoneNumber %>" id="Hidden6"> <% ' No Name? %>
</FORM>
<BR>
</FIELDSET>
<BR>

<%
If rro <> "00000000000000" Then
      ' Response.Write IsError(13) & "<BR>" & titl
      Output "<TABLE width='90%' border='1' bordercolor='#1C4299' id='Table2'>"
    Output "<TR>"
    Output "     <TD align='left' bordercolor='#FFFFFF'  bgcolor='#FF0000' class='rror' width='50%'>"
    Output "<OL>"
    If  IsError( 1) Then Output "<LI><FONT class='rror'>User name can contain only characters,'.' and '-'</FONT></LI>"
    If  IsError( 2) Then Output "<LI><FONT class='rror'>User name cann't be more than 30 characters</FONT></LI>"
    If  IsError( 3) Then Output "<LI><FONT class='rror'>Phone number cann't be less than 4 digits </FONT></LI>"
    If  IsError( 4) Then Output "<LI><FONT class='rror'>Phone number cann't be more than 10 digits</FONT></LI>"
    If  IsError( 5) Then Output "<LI><FONT class='rror'>Phone number can contain only digits</FONT></LI>"
    If  IsError( 6) Then Output "<LI><FONT class='rror'>Department name cann't be empty</FONT></LI>"
    If  IsError( 7) Then Output "<LI><FONT class='rror'>Department name can contain only characters</FONT></LI>"
    If  IsError( 8) Then Output "<LI><FONT class='rror'>Office number has to be between 10 digits and 4 digits</FONT></LI>"
    If  IsError( 9) Then Output "<LI><FONT class='rror'>HR number is required If you Alrajhi Bank Employee</FONT></LI>"
    If  IsError(10) Then Output "<LI><FONT class='rror'>HR number has to be digits only</FONT></LI>"          
    If  IsError(11) Then Output "<LI><FONT class='rror'>Office number has to be digits only</FONT></LI>"
    If  IsError(12) Then Output "<LI><FONT class='rror'>User name cann't be empty</FONT></LI> "
    If  IsError(13) Then Output "<LI><FONT class='rror'>The Title can contain only characters</FONT></LI>"
    Output " </OL>"
    Output "      </TD>"
    Output "      <TD align='right' dir='rtl' bordercolor='#FFFFFF'  bgcolor='#FF0000' class='rror' width='50%'>"
    Output " <OL>"
    If IsError( 1) Then Output "<LI><FONT class='rror'>&#1610;&#1605;&#1603;&#1606; &#1571;&#1606; &#1610;&#1581;&#1578;&#1608;&#1610; &#1575;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1578;&#1582;&#1583;&#1605; &#1593;&#1604;&#1609; &#1571;&#1581;&#1585;&#1601; &#1573;&#1606;&#1580;&#1604;&#1610;&#1586;&#1610;&#1577; &#1571;&#1608; ‘.‘ &#1571;&#1608; ‘-‘</FONT></LI>"
    If IsError( 2) Then Output "<LI><FONT class='rror'>&#1604;&#1575; &#1610;&#1605;&#1603;&#1606; &#1571;&#1606; &#1610;&#1586;&#1610;&#1583; &#1575;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1578;&#1582;&#1583;&#1605; &#1593;&#1606; 30 &#1581;&#1585;&#1601;</FONT></LI>"
    If IsError( 3) Then Output "<LI><FONT class='rror'>&#1610;&#1580;&#1576; &#1571;&#1606; &#1610;&#1603;&#1608;&#1606; &#1585;&#1602;&#1605; &#1575;&#1604;&#1607;&#1575;&#1578;&#1601; &#1571;&#1603;&#1579;&#1585; &#1605;&#1606; &#1579;&#1604;&#1575;&#1579;&#1577; &#1571;&#1585;&#1602;&#1575;&#1605; </FONT></LI>"
    If IsError( 4) Then Output "<LI><FONT class='rror'>&#1604;&#1575; &#1610;&#1605;&#1603;&#1606; &#1571;&#1606; &#1610;&#1586;&#1610;&#1583; &#1585;&#1602;&#1605; &#1575;&#1604;&#1607;&#1575;&#1578;&#1601; &#1593;&#1606; &#1593;&#1588;&#1585;&#1577; &#1571;&#1585;&#1602;&#1575;&#1605;</FONT></LI>"
    If IsError( 5) Then Output "<LI><FONT class='rror'>&#1585;&#1602;&#1605; &#1575;&#1604;&#1607;&#1575;&#1578;&#1601; &#1610;&#1578;&#1603;&#1608;&#1606; &#1605;&#1606; &#1571;&#1585;&#1602;&#1575;&#1605; &#1601;&#1602;&#1591;</FONT></LI>"
    If IsError( 6) Then Output "<LI><FONT class='rror'>&#1610;&#1580;&#1576; &#1578;&#1593;&#1576;&#1574;&#1577; &#1581;&#1602;&#1604; &#1575;&#1604;&#1573;&#1583;&#1575;&#1585;&#1577; </FONT></LI>"
    If IsError( 7) Then Output "<LI><FONT class='rror'>&#1610;&#1580;&#1576; &#1571;&#1606; &#1610;&#1603;&#1578;&#1576; &#1575;&#1587;&#1605; &#1575;&#1604;&#1573;&#1583;&#1575;&#1585;&#1577; &#1576;&#1575;&#1604;&#1571;&#1581;&#1585;&#1601; &#1575;&#1604;&#1573;&#1606;&#1580;&#1604;&#1610;&#1586;&#1610;&#1577;</FONT></LI>"
    If IsError( 8) Then Output "<LI><FONT class='rror'>&#1585;&#1602;&#1605; &#1575;&#1604;&#1605;&#1603;&#1578;&#1576; &#1610;&#1580;&#1576; &#1571;&#1606; &#1604;&#1575; &#1610;&#1602;&#1604; &#1593;&#1606; &#1571;&#1585;&#1576;&#1593;&#1577; &#1571;&#1585;&#1602;&#1575;&#1605;</FONT></LI>"
    If IsError( 9) Then Output "<LI><FONT class='rror'>&#1573;&#1584;&#1575; &#1603;&#1606;&#1578; &#1605;&#1606; &#1605;&#1608;&#1592;&#1601;&#1610; &#1575;&#1604;&#1585;&#1575;&#1580;&#1581;&#1610;&#1548; &#1601;&#1610;&#1580;&#1576; &#1578;&#1593;&#1576;&#1574;&#1577; &#1575;&#1604;&#1585;&#1602;&#1605; &#1575;&#1604;&#1608;&#1592;&#1610;&#1601;&#1610;</FONT></LI>"
    If IsError(10) Then Output "<LI><FONT class='rror'>&#1575;&#1604;&#1585;&#1602;&#1605; &#1575;&#1604;&#1608;&#1592;&#1610;&#1601;&#1610; &#1610;&#1578;&#1603;&#1608;&#1606; &#1605;&#1606; &#1571;&#1585;&#1602;&#1575;&#1605; &#1601;&#1602;&#1591;</FONT></LI>"
    If IsError(11) Then Output "<LI><FONT class='rror'>&#1585;&#1602;&#1605; &#1575;&#1604;&#1605;&#1603;&#1578;&#1576; &#1610;&#1578;&#1603;&#1608;&#1606; &#1605;&#1606; &#1571;&#1585;&#1602;&#1575;&#1605; &#1601;&#1602;&#1591;</FONT></LI>"
    If IsError(12) Then Output "<LI><FONT class='rror'>&#1610;&#1580;&#1576; &#1578;&#1593;&#1576;&#1574;&#1577; &#1575;&#1587;&#1605; &#1575;&#1604;&#1605;&#1587;&#1578;&#1582;&#1583;&#1605;</FONT></LI>"
    If IsError(13) Then Output "<LI><FONT class='rror'>&#1575;&#1604;&#1605;&#1587;&#1605;&#1609; &#1575;&#1604;&#1608;&#1592;&#1610;&#1601;&#1610; &#1610;&#1580;&#1576; &#1571;&#1606; &#1610;&#1578;&#1603;&#1608;&#1606; &#1605;&#1606; &#1571;&#1581;&#1585;&#1601; &#1573;&#1606;&#1580;&#1604;&#1610;&#1586;&#1610;&#1577; &#1601;&#1602;&#1591;.</FONT></LI>"
      Output "     </OL>"
      Output "          </TD>"
      Output "  </TR>"
      Output "</TABLE>"
End If
Output "</DIV>"
Output "</BODY>"
Output "</HTML>"
%>
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question