Suggested modifications

in
Subscribe to Suggested modifications 1 post, 1 voice

kswartz User

1. You can have a live.com account that isn't tied to hotmail. If that's the case, modify this line:

g = ['hotmail','','login','passwd','@hotmail.com']

to this:

g = ['hotmail','','login','passwd',''];

Note that the names array will need to contain the full username then, e.g.: 'user@hotmail.com', rather than just 'user'. This is most useful with the second suggestion...

2. If you have different usernames for each service, and you want the drop-down to only list the login names for THAT service, build a hash (array of arrays), and re-assign names only to the array of names for that service.

Quick-and-dirty method requires two steps. First, change this line in the beginning:

var names = [];

to this:

var NameHash = new Array();
NameHash['yahoo'] = ['yahooname1','yahooname2'];
NameHash['google'] = ['gmailuser1','gmailuser2'];
NameHash['hotmail'] = ['liveuser@mydomain.com','otheruser@hotmail.com'];

Then search for this:

userPasswd = f.elements.namedItem( g[3] );

and add this line after it:

names = NameHash[g[0]];

Enjoy.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel