Unique Function

1. Senior Member
Join Date
Dec 1969
Posts
159

## Unique Function

Hi all<BR><BR>I have been searching all morning for a function that will check all my posted values on the action page, to make sure that they are all unique. Can someone point me in the right direction?<BR>Something like:<BR>a = request("a")<BR>b = request("a")<BR>c = request("c")<BR><BR>etc...<BR><BR>i can do <BR>if a = b or<BR> a = c or<BR> c = b<BR><BR>but this will take me ages and i dont think it&#039;s efficient seeing as i am posting about 20.<BR>thanks to anyone can help...<BR><BR>

2. Senior Member
Join Date
Dec 1969
Posts
96,118

## Would be easier in browser...

...probably. But if you insist...<BR><BR>This is based on the code in http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=64<BR><BR>&#060;%<BR>fldCount = Request.Form.Count<BR>For outer = 1 To fldCount-1<BR>&nbsp; &nbsp; For inner = outer+1 To fldCount<BR>&nbsp; &nbsp; &nbsp; &nbsp; If Request.Form.item(outer) = Request.Form.Item(inner) Then<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Response.Write "duplicate values in " & Request.Form.Key(outer) _<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; & " and " & Request.Form.Key(inner)<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Response.End<BR>&nbsp; &nbsp; &nbsp; &nbsp; End If<BR>&nbsp; &nbsp; Next<BR>Next<BR>%&#062;<BR><BR>

3. Senior Member
Join Date
Dec 1969
Posts
159

## also...the page takes ages to load...

BTW, <BR>your general messageboard takes ages to load...looking at the size it&#039;s 1 215 296 bytes (source), it&#039;s always a killer towards the end of "your day" when the amount of posts gets huge...perhaps you guys should limit the size as it kills my modem at home... just my thoughts...thanks

4. Senior Member
Join Date
Dec 1969
Posts
96,118

## Don't complain to us...

We have zippo control.<BR><BR>Complain to Scott Mitchell. (Feedback button at top right of page.)<BR><BR>

5. Senior Member
Join Date
Dec 1969
Posts
96,118

## (And I agree with you)

It&#039;s a problem with most message boards. They aren&#039;t *smart* about caching info on the client&#039;s machine!<BR><BR>I could do this same board, *EASILY*, and it would load the 1MB only the first time you hit it during a Session. After that, the board would only send *changes* to your browser. (We&#039;d keep the 1MB in a JS array/collection in a hidden frame and then update the collection via another hidden frame.)<BR><BR>It&#039;s easy, but everybody seems intent on trying to do everything for these idiotic messageboards on the server. I give up. Why?<BR><BR>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•