Hello there




I woud like to write script which would check passwords and log in names stored in the external Arrays js file,

so if enyone could help me this


ARRAYS

var username = new Array(); elements

var password = new Array();elements

I was thiking somting like this,but all I want is store user names and passwords in external file.



<script type="text/javascript"language="JavaScript" >
//<![CDATA[
<!--Hide the script from non-script friendly browsers

var pairs = {Gertrude : 'goose', Bart : 'flattop'};

THEASE NAMES AND PASSWORDS SHOULD BE IN ARRAY

function logIn (f) {
if (pairs [f.username.value] != f.password.value)
{alert ('Invalid Login'); f.username.value = ''; f.password.value = ''; return false}
}


// stop hiding the script-->
//]]>
</script>


I have to be onest! Yes it is my collage task!!

Thanx for all your help