[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Posting to a page with JavaScript



Sender: daparnin@xxxxxxxxxxxxxx






As always, I appreciate the response Scott.  See my comments below.

> Maybe.  It's too open-ended of a question for me to answer.  JavaScript
> can do just about anything, including completely rearranging and
> re-encoding a web form before submitting it.

Great...

> I just went to that page, and this is the data that the HTML code will
> post:

> user=yourname&password=yourpass&switch=Log+In

> It uses content-type: application/x-www-form-urlencoded when it posts it.

> Consequently, the code you'll need to supply to HTTPAPI would look
> something like this:

> enc = http_url_encoder_new();
> http_url_encoder_addvar_s(enc: 'user'    : someuser );
> http_url_encoder_addvar_s(enc: 'password': somepass );
> http_url_encoder_addvar_s(enc: 'switch'  : 'Log In' );


I've got our digital certificate loaded on my PC so when I connect it takes
me past the login stuff.  The URL never changes in the address bar.  I'm
guessing that the JavaScript is doing its magic instead of just throwing up
basic html.

> This is the problem with trying to automate a web site that was designed
> to be used by people, rather than by a computer program.  Their help desk
> is structured to help people use a browser, not to help programmers
> emulate what the browser would do.


I've explained it to the guy I've been working with over and over but he
still tells me to try clicking on this or that.  I just want to make sure
that I learn something out of this experience to make it


> Have you asked them whether they offer a Web Service that you can
consume?
> That would be a lot more straightforward than emulating a user logging
> into their interactive site, and it would run faster, too.

> If they don't have a web service, the way you're doing it SHOULD work,
but
> it'll be more difficult and it'll be difficult to get support.

What do you mean by "consume"?  Do you mean a non-JavaScript site that I
can access that accomplishes the same thing?


Dave Parnin
--
Nishikawa Standard Company
Topeka, IN  46571
daparnin@xxxxxxxxxxxxxx

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------