This function posts data to a new browser window.
Parameters:
- url – the url to which the data will be posted
- parm1 – the first parameter’s name (Optional)
- value1 – the first parameter’s value (Optional)
- parm2 – the second parameter’s name (Optional)
- value2 – the second parameter’s value (Optional)
Example:
In this example, we have a tracking number for shipments in an order maintenance application. We are posting this tracking number to the UPS tracking website once the tracking button on the screen is clicked.
// get the button var trackButton = getObj("TrackingButton"); // assign the onclick event to the button so that it posts data to UPS trackButton.onclick = function(event) { // set the url var url = "http://www.ups.com/tracking/tracking.html"; // set the parameter and its value var param1 = "trackNums"; var trackingNum = get("I_6_20"); // post postToNewWindow(url, param1, trackingNum); }