Automating Javascript Web Form Input

Kay C Lan lan.kc.macmail at gmail.com
Sun Feb 26 19:52:56 EST 2012


I know how to use LC to do a simple web entry like this:

put URL "https://www.google.com/search?q=online+pdf+to+text+conversion"
into tHTML

But how do I handle java forms?

At this page:

http://www.fileformat.info/convert/doc/pdf2txt.htm

If I manually enter the pdf file I wish to convert, from the resulting web
page I can see how I can use LC to download the converted text file, what I
don't know is how to us LC to feed the website my pdf file so I can
automate the entire process.

I can see:
onload="document.theForm.stdin.focus()"
form name = "theForm"
method="post"
enctype="multipart/form-data"
action="pdf2txt.htm"
input type="file"
name="stdin"

I'm assuming I use the LC 'post' command, but the example in the LC
Dictionary is rather basic, my knowledge of Javascript nonexistent, so
apart from using URLEncode to encode the pathname because it contains /, I
don't know what of the above I need to include in post, and where I
substitute the actual pathname to the file I wish to convert.



Any pointers highly appreciated.



More information about the use-livecode mailing list