Using Javascript to fill in forms

G

Guenther Sohler

Hallo,

is it possible, to use javascript to automatically fill in forms,
once a site is loaded ?
that means, i would write a small html document, which has javascript
embedded.
it would first load a new site, and then fill out the forms by
'form path'

???
 
E

Erwin Moller

Guenther said:
Hallo,

is it possible, to use javascript to automatically fill in forms,
once a site is loaded ?
that means, i would write a small html document, which has javascript
embedded.
it would first load a new site, and then fill out the forms by
'form path'

???

Hi,

Yes, that is where JS is good at: forms.
eg: to change the value of some textfield named 'mytext', in a form named
'myform', try:
document.forms.myform.mytext.value='new value';

But you better get your hands on a good book, because the details of all the
elementtypes is too much to describe. (radio, checkboxes, text, textarea,
select, etc).

'Javascript, the definitive Guide', by O'Reilly would be a good choice in my
opinion.


Regards,
Erwin Moller
 
R

Randy Webb

Guenther Sohler said the following on 2/12/2007 9:55 AM:
Hallo,

is it possible, to use javascript to automatically fill in forms,
once a site is loaded ?
that means, i would write a small html document, which has javascript
embedded.
it would first load a new site, and then fill out the forms by
'form path'

No, what you are describing can't be done. It is a security violation to
try to script a document from another domain. If you are wanting it for
personal use, you can use a bookmarklet that when clicked can fill out a
form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top