Form values with HTTP Request, Submitting logged-in form

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
OlgaFB
Pro Scripter
Posts: 58
Joined: Mon Nov 01, 2004 3:04 pm
Contact:

Form values with HTTP Request, Submitting logged-in form

Post by OlgaFB » Mon Jan 17, 2005 1:59 pm

Hi All,

I have several questions.

1. If I have a form with several checkboxes, what values I send for them (as "checked") with HTTPRequest? 1? true? "true"?

2. If there is a site, where I should log in to get to a page, and then I should submit a form there. How do I do this with "HTTPRequest"s? I mean, first of all I should get to the page with the submission form sending the username and the password by HTTPRequest, and then I should sen dthe HTTPRequest submitting the form?

3. I see Marcus uses in scripts examples a lot of different objects: InternetExplorer.Application, Excel etc. How can I find out if some other of the programs I use allow the use of their objects as well? How do I find out which objects these are? For exmaple, I use Mozilla Firebird. How do I use it instead of InternetExplorer.Application?

Thank you all in advance,
Olga.

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Jan 19, 2005 2:25 pm

1. If I have a form with several checkboxes, what values I send for them (as "checked") with HTTPRequest? 1? true? "true"?
With a check box the name of the variable is the name of the checkbox and it's value is equal to the value attribute if checked and nothing if not:



Here if this check box is checked variable check1 would equal a (check1="a"). If not checked check1 would equal nothing (check1="").
2. If there is a site, where I should log in to get to a page, and then I should submit a form there. How do I do this with "HTTPRequest"s? I mean, first of all I should get to the page with the submission form sending the username and the password by HTTPRequest, and then I should sen dthe HTTPRequest submitting the form?
This really depends on the way the site is constructed. You may need to do one HTTPRequest to do the login and then another HTTPRequest to submit the form. The first one may be necessary to retrieve a session identifier which may need to be passed in the second request. You may only need one request. Basically the answer is it depends on the site and forms in question and without having a detailed look at the site in question I cannot say. You should look closely at the source of the pages and see what values are being sent and what data is passed through.
3. I see Marcus uses in scripts examples a lot of different objects: InternetExplorer.Application, Excel etc. How can I find out if some other of the programs I use allow the use of their objects as well? How do I find out which objects these are? For exmaple, I use Mozilla Firebird. How do I use it instead of InternetExplorer.Application?
Read the technical/developers documentation for the applications in question. For Microsoft applications a good place to get more info is msdn.microsoft.com.

As for Firebird I don't know if this even has an ActiveX interface. Try searching their web site or contact the developers to get more info.

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Jan 19, 2005 2:29 pm

1. If I have a form with several checkboxes, what values I send for them (as "checked") with HTTPRequest? 1? true? "true"?
With a check box the name of the variable is the name of the checkbox and it's value is equal to the value attribute if checked and nothing if not:



Here if this check box is checked variable check1 would equal a (check1="a"). If not checked check1 would equal nothing (check1="").
2. If there is a site, where I should log in to get to a page, and then I should submit a form there. How do I do this with "HTTPRequest"s? I mean, first of all I should get to the page with the submission form sending the username and the password by HTTPRequest, and then I should sen dthe HTTPRequest submitting the form?
This really depends on the way the site is constructed. You may need to do one HTTPRequest to do the login and then another HTTPRequest to submit the form. The first one may be necessary to retrieve a session identifier which may need to be passed in the second request. You may only need one request. Basically the answer is it depends on the site and forms in question and without having a detailed look at the site in question I cannot say. You should look closely at the source of the pages and see what values are being sent and what data is passed through.
3. I see Marcus uses in scripts examples a lot of different objects: InternetExplorer.Application, Excel etc. How can I find out if some other of the programs I use allow the use of their objects as well? How do I find out which objects these are? For exmaple, I use Mozilla Firebird. How do I use it instead of InternetExplorer.Application?
Read the technical/developers documentation for the applications in question. For Microsoft applications a good place to get more info is msdn.microsoft.com.

As for Firebird I don't know if this even has an ActiveX interface. Try searching their web site or contact the developers to get more info.

OlgaFB
Pro Scripter
Posts: 58
Joined: Mon Nov 01, 2004 3:04 pm
Contact:

Post by OlgaFB » Wed Jan 19, 2005 2:53 pm

Thank you, Marcus.

In case someone else is interested in the subject, I'll add this: if the input type of checkbox doesn't have any value attribute associated with it (this was my intention, as with the value everything is clear), the value passed is "on".

My question about logins was about HaloScan.com sending Trackback: it's done from the form inside logged-in region. If you find out something about it, please answer here.

Thank you very much!
Olga.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts