473,385 Members | 1,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Using Javascript to fill in forms

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'

???
Feb 12 '07 #1
2 8777
Guenther Sohler wrote:
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
Feb 12 '07 #2
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.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Feb 12 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: otto | last post by:
i need to read a variable in a javascript and translate it to a form in html the javascript variable is: <SCRIPT LANGUAGE='JavaScript'>RF2N('Total');</script> and i need to put that...
10
by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in sequence. The first one is urlencoded. My program is...
10
by: DettCom | last post by:
Hello, I would like to be able to display or hide fields based on whether a specific Yes/No radio button is selected. This is in conjunction with a posting a just made here in the same group...
4
by: Steph | last post by:
Hello, Can someone tell me the script to use for having a change on the same page when using checkbox function ? For example, i would to check one condition and display dynamically a button...
0
by: Michelle Keys | last post by:
I am trying to call a print function to print a string from a database using javascript. Which is RC_DATA of Varchar2(2500). This is a javascript is not being used. I have a thing that needs to...
11
by: Marcelo | last post by:
Hi, I need to make a robot that fills forms. I already made that with php sites, but now I need that in a javascript pages site ( the robot can be php,asp, asp.net ), anyone knows how can I do...
10
by: eggie5 | last post by:
Is it possible to get a file without using a form post? I want to get the data (bytes) of a file, text or binary, and just save it to a variable. Similar to the post body of a form that has a...
2
by: shivendravikramsingh | last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if...
1
by: fran7 | last post by:
hi, I have two javascript form validation scripts. Although the forms have different names, one of the scripts overrides the other and validates both. They have the same onsubmit, and one has a...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.