Database UserNames in JavaScript array??

Results 1 to 2 of 2

Thread: Database UserNames in JavaScript array??

  1. #1
    Join Date
    Dec 1969

    Default Database UserNames in JavaScript array??

    I have a account creation page that asks for a UserName and a PWD. Now I do not want to go to the next registration page without having checked the format of the UserName and PWD and if the UserName is still available. And I do not want to use error pages but I want all errors to be given in alerts or MsgBox&#039s on the same page for speed.<BR>Somebody told me to put the existing UserNames from my database in to JavaScript array then when I use my javascript:verify() function I can also see if the submitted UserName is already in use and give an alert if so.<BR><BR>My question: How do I put the UserNames from the database in a JavaScript array and how do I compare??

  2. #2
    Steve Cimino Guest

    Default RE: Database UserNames in JavaScript array??

    var usernames = new Array(&#060;%For i = 0 to UBound(yourrecordsetArray)<BR>Response.write chr(34) & yourrecordsetArray(i) & chr(34)<BR>If i &#060; UBound(yourrecordsetArray) Then<BR>Response.write ", "<BR>End If%&#062;)<BR><BR>Then you can loop through your JS array. This could be intensive, depending on how big your recordset is.<BR><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