Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

This function posts data to a new browser window.



  • url – the url URL to which the data will be posted
  • parm1 (optional) – the first parameter’s name name 
  • value1 (Optionaloptional)value1 –  – the first parameter’s value value 
  • parm2 (Optionaloptional)parm2 –  – the second parameter’s name name 
  • value2 (Optionaloptional)value2 –  – the second parameter’s value (Optional)value 



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.

Code Block
titlePost Tracking Number to UPS Tracking Website
// Get the button object to work with. 
// get"TrackingButton" is the value of the `id` attribute of the target button.
var trackButton = getObj ("'TrackingButton"');

// assignAssign the onclick event to the retrieved button so that it posts object.
trackButton.onclick =
  // Event handler function to post data to UPS trackButtontracking website.onclick
=  function (event) {
     // setSet variable to the urldestination URL.
    var url = "'"';

     // setSet variable to the parameter and_name_.
its value      var param1 = "'trackNums"';

    // Set variable to the parameter _value_.
    var trackingNum = get ("'I_6_20"');

     // postPost data to UPS tracking tracking website.
    postToNewWindow (url, param1, trackingNum);