Link to home
Start Free TrialLog in
Avatar of ALNMOO
ALNMOOFlag for Saudi Arabia

asked on

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


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?
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Can you post a sample ?
Avatar of ALNMOO

ASKER

the code is very huge and complicated.

I only meant a sample of the form declaration and a field, to demonstrate how you are currently attempting to retrieve the value.
Avatar of ALNMOO

ASKER


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>
Avatar of danataylor
danataylor

You need to define what you want the form to do when submitted:

<form  name="frm" method="post" action="NameOfThisModule.asp">
Avatar of ALNMOO

ASKER

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!!!
Avatar of ALNMOO

ASKER

sory :-)

I mean action.

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

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")
Try writing out the entire Form and seeing what you get:

    Response.Write Request.Form
Avatar of ALNMOO

ASKER

Response.Write Request.Form

no repsonse as if it not there!!
Avatar of ALNMOO

ASKER

I removed the outer parenthesis and it is same!
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>
Avatar of ALNMOO

ASKER

the id attribute  doesn't solve it
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'>"
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.
Avatar of ALNMOO

ASKER

I rremoved the calss tag but still same, no output
Avatar of ALNMOO

ASKER

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

Yes the line is processed.

Is there any possibility that this error from IIS?
what if you add a text box with a value.  does it show that textbox's value?
Avatar of ALNMOO

ASKER

yes
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>
Avatar of ALNMOO

ASKER

I just  test your code and doesn't work
>> 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.
Avatar of ALNMOO

ASKER

The probelm is my page connected to our DC and has LDAP query. also it is interinal site.

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.
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" />  
try sticking this in there too to see if we get a result for this.

response.write("METHOD: " & Request.ServerVariables("REQUEST_METHOD"))
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


i mean when i click on Update button it shows correct result:

Update
Avatar of ALNMOO

ASKER

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
Avatar of ALNMOO

ASKER

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?
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 ;-)
Avatar of ALNMOO

ASKER

But the problem solved without even restart IIS!!
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
Avatar of ALNMOO

ASKER

dear all,


still I didn't discover why this probelm happened?

some times it works and some times doesn't work
reinstall IIS/PWS. hope it wil fix your problem
lets narrow it down.  try using a different pc to post these values.  do you get the same results?
Avatar of ALNMOO

ASKER

yes,

I tried from another PC, and I get same probelm
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.
Avatar of ALNMOO

ASKER

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>



Avatar of ALNMOO

ASKER

CubeRoot


I tested your code in another page and it worked fine
ASKER CERTIFIED SOLUTION
Avatar of CubeRoot
CubeRoot
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial