• We should now be fully online following an overnight outage. Apologies for any inconvenience, we do not expect there to be any further issues.

Triggering a "post" action on a webform

Double Trouble

Elite Member
Oct 9, 1999
9,270
103
106
Howdy, I'm a complete newbie with web development.

I'd like to create a page or script that will perform a "post" action to a server (I know what the field names and values etc have to be) without the user actually having to click something or do anything. That way, I can just have the windows scheduler launch the form/script and have it do the post action.

Ideas?
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Markbnj's suggestion will work, but I'm not sure if you have Windows Scheduler execute JavaScript on a static HTML page on the hard drive.

You might be better off creating a VBScript. Something like this should work:

Dim oXMLHTTP
Set oXMLHTTP = CreateObject("Microsoft.XMLHTTP")
oXMLHTTP.open "POST", "http://server/pagetosubmit", False
oXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
oXMLHTTP.send "field1=value1&field2=value2&field3=value3"
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,698
4,660
75
If you want to have Windows scheduler launch something, and you can install something to launch, the best thing to launch is probably cURL. Looks like the -F option could be helpful to you.
 

Double Trouble

Elite Member
Oct 9, 1999
9,270
103
106
Thanks for the suggestions guys, I'm going to take a look at those options to see what I can conjure up.

Hammer, check. Duct tape, check. Crazy glue, check. Beer, check. Ok, I'm ready to go develop something ;)
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Originally posted by: Double Trouble
Thanks for the suggestions guys, I'm going to take a look at those options to see what I can conjure up.

Hammer, check. Duct tape, check. Crazy glue, check. Beer, check. Ok, I'm ready to go develop something ;)

You forgot your Dr. Pepper and chips.
 

zebano

Diamond Member
Jun 15, 2005
4,042
0
0
Originally posted by: Crusty
Originally posted by: Double Trouble
Thanks for the suggestions guys, I'm going to take a look at those options to see what I can conjure up.

Hammer, check. Duct tape, check. Crazy glue, check. Beer, check. Ok, I'm ready to go develop something ;)

You forgot your Dr. Pepper and chips.

Sorry dude, the only acceptable drinks while "coding" are Jolt, Mt. Dew or coffee.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Originally posted by: zebano
Originally posted by: Crusty
Originally posted by: Double Trouble
Thanks for the suggestions guys, I'm going to take a look at those options to see what I can conjure up.

Hammer, check. Duct tape, check. Crazy glue, check. Beer, check. Ok, I'm ready to go develop something ;)

You forgot your Dr. Pepper and chips.

Sorry dude, the only acceptable drinks while "coding" are Jolt, Mt. Dew or coffee.

Coffee in the morning... Dr. Pepper in the evening!