Hiding   Web   Pages     
          Hiding Web Pages on Processing-Only Calls  






Sometimes we need to make “processing-only” web page calls.  We need to navigate to a web page because by doing so we invoke some sort of back-end processing within the Presentation Services.  We want to navigate to the called page and then immediately navigate back to the page from which the call was made.  However, as we have no control over the contents of the web page that is being called we can’t force a redirect.  We don’t want the user to see the called page or to know that it exists.  However, we would like to have the option to see the contents of the called page for debugging purposes.





Let’s start with a dashboard request:

Dashboard Request


Suppose that we want to make an ODBC call to function “NQSSetSessionvalue” to set the value of session variable “SN_TEST” to “Value1” from the Raw SQL window using the following URL:

URL to call Raw SQL Window


Now we can add a link named “Raw SQL”:

Link to call Raw SQL Window


to the dashboard:

Dashboard with Raw SQL Link


When we click on the link the Raw SQL window appears, showing the completed ODBC call and the result code:

Raw SQL Window with Completed ODBC Call


But we don’t want a user to have to manually click on a link to bring up the window and we don’t want the user to have to click on the back button to return to the calling page.  We want the entire process of navigating back and forth to take place “under the bonnet”.



Using a Dimensionless IFRAME


A convenient way to achieve the desired functionality is to embed the URL in an “iframe” that is called from a text object:

IFRAME to show Raw SQL Window within Dashboard


The result is that the Raw SQL window is embedded within the dashboard, giving a view that is suitable for debugging purposes:

Raw SQL Window embedded within Dashboard


For normal usage we set the frame dimensions to zero:

IFRAME to hide Raw SQL Window within Dashboard


so that the ODBC function call is made automatically on entry to the dashboard and the appearance of the dashboard remains unchanged:

Raw SQL Window hidden within Dashboard


Note that we could also use the “embedded content” object on the dashboard editor to achieve the same results by setting its dimensions to zero.  An embedded content object is implemented using an “iframe” and it offers a subset of the functionality available using a dashboard text object.  The main disadvantage of using an embedded content object is that it does not accept variable references embedded within the URL or the use of inline Javascript to dynamically generate the URL.