Results into an HTML Form

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
brentmtc
Newbie
Posts: 8
Joined: Wed Jun 04, 2008 7:20 pm
Location: U.S.

Results into an HTML Form

Post by brentmtc » Tue Jun 10, 2008 8:58 pm

I have created a Macro that collects data from a web form(text boxes, radio buttons, etc.) and puts those results into a message box. I would like to put those results into an HTML form. Can anyone give me some advice on how to do this? Any help would be greatly appreciated.






Thank you,


-brentmtc :)

edauthier
Pro Scripter
Posts: 84
Joined: Sun Apr 13, 2003 1:26 pm
Location: USA

Post by edauthier » Tue Jun 10, 2008 9:45 pm

What about writing the results to a text file?Like so:

Code: Select all

writeln>c:\web.txt,<html>
writeln>c:\web.txt,<head>
writeln>c:\web.txt,<title>Macro Results Web Page</title>
writeln>c:\web.txt,</head>
writeln>c:\web.txt,<body>
Writeln>c:\web.txt,<span>%Macro Data Collection%</span>
writeln>c:\web.txt,</body>
writeln>c:\web.txt,</html>
Then convert the text file to web.htm.. I think this is a great idea for Macro use.

brentmtc
Newbie
Posts: 8
Joined: Wed Jun 04, 2008 7:20 pm
Location: U.S.

Results into an HTML Form

Post by brentmtc » Wed Jun 11, 2008 2:55 pm

I used the code you suggested which turned my results into a text. I can open that text file and then save it as a .htm file then open that file and it displays my results in a browser. Can I use an HTTP_POSTFILES method to automate this process? For example:



// Get SubmitTest.txt to 'Post' by converting to SubmitTest.htm

Let>HTTP_POSTFILES=upload1=c:\Documents and Settings\*****\My Documents\Macro Scheduler\SubmitTest.txt

HTTPRequest>http://*************/FormAccept.aspx,,POST,,HTMLResponse

Thank you for your help,


-brentmtc

edauthier
Pro Scripter
Posts: 84
Joined: Sun Apr 13, 2003 1:26 pm
Location: USA

Post by edauthier » Thu Jun 12, 2008 3:09 am

Brent,
You lost me a bit from your first question/requirement. Can you clarify your total process?

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Thu Jun 12, 2008 3:24 am

I think when he wrote "put those results into an HTML form" he meant entering the values into an existing webform rather than create an HTML document.

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