Closed Thread Icon

Topic awaiting preservation: Automatic Form Fill? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8538" title="Pages that link to Topic awaiting preservation: Automatic Form Fill? (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Automatic Form Fill? <span class="small">(Page 1 of 1)</span>\

 
Shard
Bipolar (III) Inmate

From: Richmond, VA
Insane since: Nov 2000

posted posted 02-19-2003 16:42

I'm working on another project for an intranet based site at work. There are several Internet pages that we use on a regular basis at work that require a username and password. What I would like to find is a script that, when a link is clicked, will open the Internet page and automatically fill in the generic username and password for that particular page. Is this possible? If so, is it possible with javascript?

trib
Paranoid (IV) Inmate

From: Den Haag, Netherlands
Insane since: Sep 2002

posted posted 02-19-2003 16:51
code:
document.forms[n].elements[m].value = theUserName;


Where n=the form position on the page (i.e. in most cases 0)
and m=the element position within the form (probably 0 too if username is at the top)

Otherwise, and more correctly for DOM browsers, give an ID to each form element

code:
<INPUT type=text id=uname value=''>


and then preset the form with an onload function containing lines like ...

code:
document.getElementById['uname'].value = theUserName;



Did I miss anything out ??




[This message has been edited by trib (edited 02-19-2003).]

Shard
Bipolar (III) Inmate

From: Richmond, VA
Insane since: Nov 2000

posted posted 02-19-2003 20:39

Thanks for the response trib but, if I'm understanding you correctly, the code you've included would have to be on the page that we're going to. The problem is I have no control over those pages. They're various Internet pages that aren't maintained by us. What I was asking was if there's a way to "throw" those generic usernames and passwords from our intranet page over to those pages. I may have misread what you're saying. Can I get some clarification?

Thanks in advance.

trib
Paranoid (IV) Inmate

From: Den Haag, Netherlands
Insane since: Sep 2002

posted posted 02-19-2003 21:57

AFAIK there's no way to push data to an HTML page unless it's specifically set up to receive it. You CAN push data to the page which is called by the data entry page, using the usual method of adding parameters to the URL ... but my guess is that a password would be a bit too confidential for you to want to do something so insecure.

If it's not considered a security risk, then open the page, view the source, find the form where the username etc. are input. If the method is get or post, check out the action - that's the url of the target page - e.g.

code:
<FORM METHOD=POST ACTION=http://www.thing.act>

... then check out the names of the input fields for the required fields. You can then construct a URL out of the action URL and use that as your start page e.g.

code:
http://www.thing.act?username=albert&password=lemme-in

. It probably won't work, but that's the only way I could see of trying to do it.




[This message has been edited by trib (edited 02-19-2003).]

Shard
Bipolar (III) Inmate

From: Richmond, VA
Insane since: Nov 2000

posted posted 02-20-2003 00:45

That makes sense. I'll take a stab at it and let ya know how I make out. Thanks for the input trib.

« BackwardsOnwards »

Show Forum Drop Down Menu