/    Sign up×
Community /Pin to ProfileBookmark

Field "REQUIRED" Validation for looped (Multiple) Textbox (Field)

Please could somebody help out with Field “REQUIRED” Validation for looped (Multiple) Textbox (Field)

Here is my script:

<script language=”JavaScript” src=”ew.js”></script>

<script language=”JavaScript”>

<!– start Javascript

function EW_checkMyForm(EW_this) {

return true;

}

// end JavaScript –>

</script>

<form onSubmit=”return EW_checkMyForm(this);” action=”sampleedit.asp” method=”post”>

<p>

<input type=”hidden” name=”a” value=”U”>

<input type=”hidden” name=”key” value=”<%= key %>”>

<table border=”0″ cellspacing=”2″ cellpadding=”0″ bgcolor=”#FFFFFF”>

<tr>

<table width=”679″ height=”46″ border=”0″ cellpadding=”0″ cellspacing=”0″>

<tr>

<tr>

<td width=”83″ height=”79″ bgcolor=”#0099CC”><div align=”center”><font color=”#FFFFFF”><font size=”-1″><strong>Device

ID</strong></font></font></div></td>

<td width=”51″ bgcolor=”#0099CC”><div align=”center”><font color=”#FFFFFF”><font size=”-1″><strong>Set<br>

Point<br>

Pressure<br>

</strong></font></font></div></td>

<td width=”51″ bgcolor=”#0099CC”><div align=”center”><font color=”#FFFFFF”><font size=”-1″><strong>Found<br>

Pressure<br>

</strong></font></font></div></td>

<tr>

<%

table_name = “pressuredevice” ‘ Name of the sub table

newRecord = False

tkey = “‘” & replace(replace(key & “”,”‘”,”””),”[“,”[[]”) & “‘”

strsql = “SELECT * FROM ” & table_name & ” WHERE [FACILITYCOMPONENTID] =” & tkey

Set Rs = Server.CreateObject(“ADODB.Recordset”)

Rs.Open strsql, conn, 3, 3

If Rs.EOF Then

Response.write “Pressure Devices not Applicable!”

Else

If Rs.RecordCount > 0 Then

Record_Count = 0

Do While Not Rs.EOF

Record_Count = Record_Count + 1

If Record_Count > 500 Then Exit Do ‘ exit loop if returns more than 500 records, you can change this limit

‘Row created as records

‘ Get the field contents

x_DEVICEID = RS(“DEVICEID”)

x_SETPOINTPRESSURE = Rs(“SETPOINTPRESSURE”)

x_FOUNDPRESSURE = Rs(“FOUNDPRESSURE”)

%>

<tr id=”<%=Record_Count%>” name=”<%=Record_Count%>”>

<td class=”data” height=”58″ bgcolor=”#F5F5F5″><div align=”center”><font size=”-1″>

<input type=”text” name=”x_DEVICEID” value=”<%= x_DEVICEID %>” size=15 maxlength=10>

</font></div></td>

<td class=”data” bgcolor=”#F5F5F5″><div align=”center”><font size=”-1″>

<input type=”text” name=”x_SETPOINTPRESSURE” value=”<%= x_SETPOINTPRESSURE %>”size=6 maxlength=8>

</font></div></td>

<td class=”data” bgcolor=”#F5F5F5″><div align=”center”><font size=”-1″>

<input type=”text” name=”x_FOUNDPRESSURE” value=”<%= x_FOUNDPRESSURE %>” size=6 maxlength=8>

</font></div></td>

</tr>

<%

Rs.MoveNext

Loop

End If

End If

%>

</table>

<p>&nbsp;</p>

<p>&nbsp;</p>

<input type=”submit” name=”Action” value=”EDIT”>

</form>

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliAug 15.2003 — please explain your question a bit in detail.
Copy linkTweet thisAlerts:
@joeloauthorAug 20.2003 — All I am trying to do Field "REQUIRED" Validation for multiple field...I don't know if I am making any sense now.....
×

Success!

Help @joelo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...