hi
Is ther anyway i can automatically fill out forms and submit them thru
java?
supposing i hav a normal txt file that contains all data that needs to
be filed out into the form, is there anyway i can fill out a form and
submit it automatically by providing only the URL of the form and the
txt file?
thanks
Najla 7 2949 gr******@yahoo.com wrote: hi Is ther anyway i can automatically fill out forms and submit them thru java?
Java?
Yes, you can make forms in Java, and by means of applets you can even show
them in a webpage. But I seriously doubt if that is what you want.
If so, visit a Java newsgroup, like comp.lang.java.help, it is good.
I think you mean Javascript. (In that case, this is the right newsgroup.)
supposing i hav a normal txt file that contains all data that needs to be filed out into the form, is there anyway i can fill out a form and submit it automatically by providing only the URL of the form and the txt file?
Not by means of Javascript, because Javascript does not have access to your
textfile. Javascript is crippled intentionally when it come to local
fileaccess for securityreasons.
You better look at a serverside solution, using something like PHP.
Regards,
Erwin Moller
thanks Najla
Cases: Java : wrong news group. Also, Java cannot fill in forms of a
web page unless that page was generated by JSP, and that will be done
before the page is displayed, supposing your text file is on the
server. But that defeats the point, so I am supposing your file is on
your hard drive
javascript: AJAX
You can request a file from the server using XMLHttpRequest
This would mean your text file would already be on the server
In this case, you might as well provide a <input type="file" /> and
upload that. You can write then a PHP script to parse that file.
SO
solution in javascript: none
solution in Java: yes, via Applets (ref Erwin's post)
solution in PHP: probably, provided PHP is activated on your server and
depending on what you want to do with the data.
AndrewTK wrote: [...] javascript: AJAX You can request a file from the server using XMLHttpRequest
True.
This would mean your text file would already be on the server
Not necessarily.
In this case, you might as well provide a <input type="file" /> and upload that. You can write then a PHP script to parse that file.
True.
SO solution in javascript: none
Nonsense.
PointedEars
Thomas 'PointedEars' Lahn wrote:
<snip> SO solution in javascript: none Nonsense.
Hey PointedEars,
Why do you say what Andrew wrote was nonsense?
I mean, how do you suggest the OP fills in his form using values from a
textfile somewhere, using only Javascript?
Or were you refering to an AJAX-like solution?
Me curious.
I saw you write lots of sensible stuff in here, so I guess you have some
trick up your sleeve. :P
Regards,
Erwin Moller
PointedEars
Erwin Moller wrote: Thomas 'PointedEars' Lahn wrote: SO solution in javascript: none Nonsense.
[...] Why do you say what Andrew wrote was nonsense?
Well, whether this statement qualifies as nonsense (or being wrong) would
depend on what is meant by "solution in JavaScript". Certainly there is
a solution /with/ JavaScript (or another ECMAScript implementation) that
involves a host object (e.g. an implementation of IXMLHttpRequest), and
from someone who uses the AJAX (Asynchronous JavaScript and XML) buzzword
I understand "in JavaScript" as "with JavaScript".
But even if I understood "in JavaScript" as "only with an ECMAScript
implementation and no other programming language involved" it would be
wrong, because the AndrewTK's preconception that the resource must be
accessible from a (HTTP) server is wrong. IXMLHttpRequest implementations
(and other host objects) can be used without XML and HTTP. The OP's
description is not clear enough to exclude anything here.
I mean, how do you suggest the OP fills in his form using values from a textfile somewhere, using only Javascript? Or were you refering to an AJAX-like solution?
The latter.
PointedEars
AndrewTK wrote: Cases: Java : wrong news group. Also, Java cannot fill in forms of a web page unless that page was generated by JSP, and that will be done before the page is displayed, supposing your text file is on the server. But that defeats the point, so I am supposing your file is on your hard drive
javascript: AJAX You can request a file from the server using XMLHttpRequest This would mean your text file would already be on the server In this case, you might as well provide a <input type="file" /> and upload that. You can write then a PHP script to parse that file.
1. Text file on the server - will require a server side script to
return the file. This script can prefill the form withou the help of
JS.
2. Text file local by uploading to the server - again, JavaScript not
necessary
3. User pastes the content of text file into textarea - JavaScript can
parse it into appropriate fields. No server side script necessary. SO solution in javascript: none solution in Java: yes, via Applets (ref Erwin's post) solution in PHP: probably, provided PHP is activated on your server and depending on what you want to do with the data.
Roman Ziak wrote: 1. Text file on the server - will require a server side script to return the file. This script can prefill the form withou the help of JS.
2. Text file local by uploading to the server - again, JavaScript not necessary
But possible. J(ava)Script can be server-side.
3. User pastes the content of text file into textarea - JavaScript can parse it into appropriate fields. No server side script necessary.
4. A host object is used to access the local text file. The ECMAScript
implementation can parse the content string it into appropriate fields.
No server-side script necessary.
PointedEars This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Alex Hunsley |
last post by:
I'm using urllib to post data to a web form by issuing a command similar to this:
filename, headers =
urllib.urlretrieve("http://www.thewebsitenamehere.com/servlet/com.blah.bloo.XmlFeed",...
|
by: Logical |
last post by:
I have a form which houses basic inputs, as well as a few multiple select
forms.
I need to parse all the 'values' which are in this multiple select form (it
gets manipulated dynamically client...
|
by: Piotr Kurpiel |
last post by:
Hi,
I am creating a site where I need to refer to another external file
(aspx).
I create the form and works fine. But as soon as I try to submit the
form automatically (with form.submit()) I get...
|
by: Stanley |
last post by:
Hi,
I'd like to write a HTML page which can help me directly log in my
Yahoo!mail or Gmail account without typing user name and password.
Basically, I want to set up a link, click it and pop up...
|
by: Victor |
last post by:
Dear Members
I'm new here. Please permit me to ask some newbie question
I'm from a non-profit organization, working for gender equality. We
wish to get a small message across to sister blogs...
|
by: degmsb |
last post by:
With Java script when a user hits submit on a form on my site, is it
possible to take the values from the form and submit them to another
form on another Url without the user who submitted the form...
|
by: grpmangr |
last post by:
hi
Is ther anyway i can automatically fill out forms and submit them thru
java?
supposing i hav a normal txt file that contains all data that needs to
be filed out into the form, is there anyway...
|
by: Homer |
last post by:
Hi,
I just got a requirement from my HR department to automate their form
submission process and integrate it into the Intranet project that I
had just completed Phase 1 of. Because of the...
|
by: sitvasu |
last post by:
hi,
i am srinivas (new to this forum).
i have an application in java, which has to submit forms automatically.
can some body please help me in finding the relevant API to use.
thanks in...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM).
In this month's session, the creator of the excellent VBE...
|
by: MeoLessi9 |
last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
| |