G
Guest
I have a data access page in Access that has a few dropdown lists, buttons
and textboxes on it. (pretty simple) When you view the access page and enter
information into the fields, it stores the data in an SQL db. In the code of
my data access page, I have a javascript password generator:
<SCRIPT language=JavaScript>
<!-- Begin
function randomPassword()
{
chars = "abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ123456789";
pass = "";
for(x=0;x<10;x++)
{
i = Math.floor(Math.random() * 62);
pass += chars.charAt(i);
}
return pass;
}
function formSubmit()
{
password.value = randomPassword();
return false;
}
// End -->
</SCRIPT>
On my data access page is a text box called password. I want the password
text box to fill when the page loads with information generated by my
function called randomPassword()
so i used the following code in the <body> tag
<body onload=formSubmit()>
this should work but it does not put my generated password in my text box
called password. Any ideas?
and textboxes on it. (pretty simple) When you view the access page and enter
information into the fields, it stores the data in an SQL db. In the code of
my data access page, I have a javascript password generator:
<SCRIPT language=JavaScript>
<!-- Begin
function randomPassword()
{
chars = "abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ123456789";
pass = "";
for(x=0;x<10;x++)
{
i = Math.floor(Math.random() * 62);
pass += chars.charAt(i);
}
return pass;
}
function formSubmit()
{
password.value = randomPassword();
return false;
}
// End -->
</SCRIPT>
On my data access page is a text box called password. I want the password
text box to fill when the page loads with information generated by my
function called randomPassword()
so i used the following code in the <body> tag
<body onload=formSubmit()>
this should work but it does not put my generated password in my text box
called password. Any ideas?