November 4, 201015 yr I've been running a script that imports orders from our client and posts a response in the format: http://company.stage.program.com/updateOrderXml.asp?xml=12345RECEIVED BY PRINTER11/4/2010 9:30:06 AM > I need to run the script server-side, so I want to use scriptmaster to post the URL. We've registered the PostDataToUrl and the result of our script using the function is only "Error" Not having a "Key" or "Value", I formatted the setfield to: PostDataToURL( "" ; "" ; URLField ) Any suggestions? Andy
November 4, 201015 yr The PostDatatoURL function is used for posting information to a URL with a POST request. The information you want to post is passed in the Key and Value parameters, which would be the name of the key you want to pass, and the value for that key. Leaving these two fields blank means that you are not passing any information. The function is trying to post information with a POST request and the key "" with the value "" which isn't going to work because that isn't any information, and so the server is giving you an error. You will need to add the key and value that you are trying to post as the values in that parameter. It looks like you may be needing to just access a URL with a set of parameters, which is your XML data passed as a URL parameter. You may want to try either just passing this URL into a web viewer, or you can check out our Web Assistant plugin, which has the WAGetURL function which may help you perform what you are trying to do.
November 5, 201015 yr Author David, If I understand correctly, I'd need a more complex relationship with the target of the post to use the functions in ScriptMaster. Passing the URL into a web viewer is not available as a server-side scripting function. Is your Web Assistant able to run in a server-side script? Andy
November 12, 201015 yr Based on your post, here is what you would use for the parameters: The url is 'http://company.stage.program.com/updateOrderXml.asp' The key is 'xml' The value is '12345RECEIVED BY PRINTER11/4/2010 9:30:06 AM ' Edited November 12, 201015 yr by Guest
Create an account or sign in to comment