Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] FOCEXEC USING POST METHOD

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] FOCEXEC USING POST METHOD
 Login/Join
 
Member
posted
How to call a fex procedure in a fex procedure using post method
 
Table file tab
print
 Field1
on table set style *
$
TYPE=DATA,
COLUMN=FIELD1,
FOCEXEC=test_poc_form.fex(P_ROOT=DEPARTMENT_MEMBER)
$
End



I can call this by the above method
but with this the URL and its paremeters are visible in the browser

Do any body give me the code how to hide this URL or some thing like POST method

Regards,
cd prasad

This message has been edited. Last edited by: Kerry,
 
Posts: 20 | Registered: December 21, 2006Report This Post
Guru
posted Hide Post
quote:
prasad

You can do it by calling a javascript function instead. The javascript function would build a form, fill in the elements and then submit the form.

Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
 
Posts: 278 | Registered: October 10, 2006Report This Post
Expert
posted Hide Post
Something like this:

-SET &ECHO=ALL;

TABLE FILE CAR
PRINT SALES
BY COUNTRY
BY MODEL
ON TABLE SET ONLINE-FMT HTMTABLE
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, FONT='VERDANA', SIZE=8, $
TYPE=TITLE, STYLE=BOLD, $
TYPE=DATA, COLUMN=COUNTRY, JAVASCRIPT=RunReportDD( COUNTRY ), $
ENDSTYLE
END
-RUN

-HTMLFORM BEGIN
<SCRIPT language='javascript'>

function RunReportDD(vCountry)
{
vReportURL = '/ibi_apps/WFServlet?' + 'IBIF_ex=' + 'DRILL1DD1' + '&|COUNTRY=' + vCountry;

// Construct the Report window's features
vFeatures =
"channelmode=no, directories=no, fullscreen=no, " +
"location=no, menubar=no, resizable=yes, scrollbars=yes, " +
"status=yes, titlebar=no, toolbar=no, "
"left=0, top=0, width=" + screen.availWidth + ", height=" + screen.availHeight;

wRepWindow = window.open(vReportURL, 'wRepWindow', vFeatures);
wRepWindow.focus();
}
</SCRIPT>

-HTMLFORM END


The one problem with this method is that in the drill-down report, the user can right-click and select Properties to see the URL.

You can disable the right-click functionality with something like this:

-SET &ECHO=ALL;

-DEFAULT &TARGET = '';

TABLE FILE CAR
PRINT SALES
BY COUNTRY
BY MODEL
WHERE COUNTRY EQ '&COUNTRY'
HEADING
"DRILL1DD1 / &TARGET"
ON TABLE SET ONLINE-FMT HTMTABLE
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, FONT='VERDANA', SIZE=8, $
TYPE=TITLE, STYLE=BOLD, $
ENDSTYLE
END
-RUN

-HTMLFORM BEGIN
<SCRIPT language=JavaScript>
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="Function Disabled!";

///////////////////////////////////
function clickIE4()
{
if (event.button==2)
  {
  alert(message);
  return false;
  }
}

function clickNS4(e)
{
if (document.layers||document.getElementById&|&|!document.all)
  {
  if (e.which==2||e.which==3)
    {
    alert(message);
    return false;
    }
  }
}

if (document.layers)
  {
  document.captureEvents(Event.MOUSEDOWN);
  document.onmousedown=clickNS4;
  }
  else if (document.all&|&|!document.getElementById)
    {
    document.onmousedown=clickIE4;
    }

document.oncontextmenu=new Function("alert(message);return false");
</SCRIPT>
-HTMLFORM END


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Although Francis' method will work nicely, I think Fernando's suggestion might be alittle cleaner. You can use the JSURL setting to load an existing javascript file into your html report. The JS file can then do the rest without having to create any html.

In the focexec, add the following:
 SET JSURL=/approot/baseapp/changeatoform.js 


Create a file in the baseapp directory called - oddly enough - changeatoform.js, containing the following:
 
function changeAllA() {
     var anchorList = document.getElementsByTagName("a");
     for (var i = 0; i < anchorList.length; i++) {
          anchorList[i].href = "JavaScript:submitAasForm(\"" + anchorList[i].href + "\");";
     }
}

var submit_form = "submit_form";

function submitAasForm(qs) {
     var submit_form = document.getElementById(submit_form);
     if(!submit_form) {
          submit_form = document.createElement("FORM");
	  if(submit_form) {
	       submit_form.name = submit_form;
	       submit_form.id = submit_form;
               document.body.appendChild(submit_form);
	  }
     } else {
          var children = submit_form.childNodes;
	  var len = children.length;
          for(var i = len-1; i >= 0; i--) {
	       submit_form.removeChild(children[i]);
          }
     }
     var qsValues = qs.split('?');
     submit_form.action = qsValues[0];
     submit_form.method = "post";
     var keyPairs = qsValues[1].split("&");
     for (i=0; i<keyPairs.length; i++) {
          if (keyPairs[i] != "") {
               // alert(keyPairs[i]);
               var keyValues = keyPairs[i].split("=");
     	       var input = document.createElement("INPUT");
	       if(input) {
		     input.type = "hidden";
		     input.name = keyValues[0];
     		     input.value = keyValues[1];
     		     submit_form.appendChild(input);
     	       }
     	   }
     }
     submit_form.submit();
}

if (window.addEventListener) {
	window.addEventListener('load', 'changeAllA', false);
} else if (window.attachEvent) {
	window.attachEvent('onload', changeAllA);
} else {
	alert("not supported");
} 


When your report runs, this will dynamically change all the href's to javascript calls. The javascript will then create a form and all the parameters as hidden input boxes and submit the form as a post.

Hope this helps

This message has been edited. Last edited by: dhagen,


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Gold member
posted Hide Post
I tried the JSURL method but that doenst seem to work for me. I am not that familiar with JS so was wondering what to do if I wanted to hide/obscure the URLs for the following multi drill down.

TYPE=DATA,
COLUMN=N1,
TARGET='_self',
DRILLMENUITEM='Trial Balance by Main',
FOCEXEC=app/trialb_bymain( \
LINO=LINENO \
TBPER=PERIOD \
TBCS=CCENTR \
TBCCD='&ISCCD' \
),
DRILLMENUITEM='Trial Balance by Main, Location',
FOCEXEC=app/trialb_bymainloc( \
LINO=LINENO \
TBPER=PERIOD \
TBCS=CCENTR \
TBCCD='&ISCCD' \
),
$


WebFOCUS 7.6.10
Windows
all output (Excel, HTML, PDF)
 
Posts: 69 | Registered: March 11, 2010Report This Post
Virtuoso
posted Hide Post
FOCEXEC style keyword will always create a fully-formed URL! The only way to "hide" parameters in it is to either embed them inside of an HTML <form> element using method=post --OR-- issuing an Ajax call to handle the whole process.

Regardless of which method you use, Javascript is the language that will allow you to do that.

Both of the approaches provided by Francis and dhagen work but you will need to get more than familiarized with Javascript to fully enhance the functionality of your reporting applications. Regrettably WebFOCUS cannot completely help you there.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Guru
posted Hide Post
I understand this is an old thread but, I have a similar requirement where I COMPUTE a URL to call an external application (http://servername/some.aspx?parms=BlobField)
with a BLOB or varcharMAX which will break the browser limit. Any ideas on how to get this function working for URL call?
We're using 8202 here
Thanks in advance!
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] FOCEXEC USING POST METHOD

Copyright © 1996-2020 Information Builders