Focal Point
Call to an FEX file from htm is working whereas from another FEX is failing.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9641054552

November 03, 2007, 02:47 AM
johney
Call to an FEX file from htm is working whereas from another FEX is failing.
Hi All,

Please look at to the code below.

formsbmt.fex
----------------
  
TABLE FILE WFTST_LONG
PRINT
ID
WHERE ID EQ 1
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     PAGESIZE='SCREEN',
     LEFTMARGIN=0.000000,
     RIGHTMARGIN=0.000000,
     TOPMARGIN=0.000000,
     BOTTOMMARGIN=0.000000,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=DATA,
     COLUMN=N1,
     JAVASCRIPT=do_pass,
$
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<title>Insert FTM file in Select</title>
</head>
<body>
<form name=form action=WFServlet target=_blank>
<input type=hidden name=IBIF_ex value=showvals.fex>
<textarea name=tarea2 style="position:absolute; top:180; left:200;" rows="10" cols="72" value=" ">
</textarea>
</form>
<script language=javascript>
function do_pass() {
var x = confirm("Sure?");
if (x)
{
  TXobj = document.getElementById("tarea2");
  TXobj.value = escape(TXobj.value);
  document.getElementById("form").submit();
  return true;
}
  else
{
  return false;
}
}
</script>
</body>
</html>
-HTBLFORM END

Showvals.fex
--------------
- TYPE tarea2 &tarea2

My FEXs are stored under EDASERVE--> applications--->johney

When executing the formsbmt.fex after entering some value (I entered a value as "johney") and click on the link appears on the data element , it is trying to call the showvals.fex but unable to locate it.

It is showing me an error

Not Found
The requested URL /approot/johney/WFServlet was not found on this server.

Following is the address in the IE it took.

http://servername.com:23000/approot/johney/WFServle...ls.fex&tarea2=johney

When I removed the table file and placed a button to call the do_pass function it is working fine. Where did it go wrong when tried with Javascript call method. I am pasting a code which worked well.

formsbmt.fex
----------------
  

Note:- If I copy the below code and make and htm without -HTMLFORM tags , it is also working perfectly.

-HTMLFORM BEGIN
<html>
<body>
<form name=form action=WFServlet target=_blank>
<input type=hidden name=IBIF_ex value=showvals.fex>
<textarea name=tarea2 style="position:absolute; top:180; left:200;" rows="10" cols="72" value=" ">
</textarea>
<INPUT  onclick="do_pass();" style="POSITION: absolute; TOP: 470px; LEFT: 160px; WIDTH:
                                      80px; HEIGHT: 30px;" type="button" value=Submit>

</form>
<script language=javascript>
function do_pass() {
var x = confirm("Sure?");
if (x)
{
  TXobj = document.getElementById("tarea2");
  TXobj.value = escape(TXobj.value);
  document.getElementById("form").submit();
  return true;
}
  else
{
  return false;
}
}
</script>
</body>
</html>
-HTBLFORM END


It called the showvals.fex correctly and IE addressbar shows like,

http://servername.com:23000/ibi_apps/WFServlet?IBIF...ls.fex&tarea2=johney

Major difference I could notice is that , when I remove any FEX related code then it correctly located to servername.com:23000/ibi_apps/
where as when we added FEX commands and do a submit it located to
servername.com:23000/approot/johney/

Why ?

Any suggestions?

Thanks and regards,
Johney.

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


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
November 05, 2007, 09:59 AM
GinnyJakes
Try adding hidden input variable IBIAPP_app to point to the directory. If the johney directory is not in the global path, it won't be found because you are not running as your id at the moment that is happening.




Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
November 05, 2007, 10:25 AM
GamP
Johney,
The action part in your form should read 'action=/ibi_apps/WFServlet', not just WFServlet.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
November 05, 2007, 11:20 AM
johney
Thank you GamP ,It worked... That was is the issue . Thanks a lot.

Ginny , I will try your suggestion also . I am curious to learn different techniques in Webfocus.


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF