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] Using javascript to redirect to another window and running a FEX

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Using javascript to redirect to another window and running a FEX
 Login/Join
 
Member
posted
Using HTML Composer, I am creating a launch page and I can define a hyperlink using the following syntax (right from Developing Reporting Applications manual, page 117), and it works.
  • <.A HREF="/ibi_apps/WFServlet?IBIF_ex=csales&CATEGORY=
    Coffee&RGN=Midwest">Midwest

    But what I really want to do is put a redirect to a FEX using Javascript like this:
    var varWindowStr = 'http://dcicorwf01/ibi_appsWFServlet?IBIF_ex=carfile_by_minsales';

    window.location=varWindowStr;

    It tells me the focexec procedure cannot be found.

    What I want to accomplish is having a multi-select combo box with different procedures (reports) listed so the user can select one to many of them to run. I want to put the javascript logic behind the ONCLICK event to kick each selected report off.

    I say all this in case anyone knows of a better way I should try to accomplish this (read: rookie HTML composer developer).

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


    WebFOCUS 7.6.9
    Windows Server 2003
  •  
    Posts: 23 | Location: Nashville | Registered: April 10, 2009Report This Post
    Expert
    posted Hide Post
    Try adding IBIAPP_app=dirname to your URL where dirname is the directory where your focexec is.


    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
     
    Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
    Member
    posted Hide Post
    I am trying that with no luck, Ginny. But I need to maybe ask this: do I put the full drive and path of the dir, or just the Domain name, or "app"....I am not having luck with anything I am trying.

    I think its the right suggestion though - telling it where to look for it.

    Any additional advice?


    WebFOCUS 7.6.9
    Windows Server 2003
     
    Posts: 23 | Location: Nashville | Registered: April 10, 2009Report This Post
    Member
    posted Hide Post
    If I user HTML composer to prompt me to assign this report as a hyperlink to a button, and then peek at the code it creates, I see this:

    INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=sandbox name=ibiapp_app persistentuniqueid="compUid_56" ismre="1" name="ibiapp_app"

    So the value I want is sandbox, correct?


    WebFOCUS 7.6.9
    Windows Server 2003
     
    Posts: 23 | Location: Nashville | Registered: April 10, 2009Report This Post
    Master
    posted Hide Post
     
    Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
    Virtuoso
    posted Hide Post
    This IBIAPP_app variable that htmlcomposer puts in the form is just one of the input fields. Have you also looked at the other input fields created by the composer? It may be that you require some more parameters to pass on to webfocus when you're in mre. Looking at the code generated by the html composer could point you to a possible solution.


    GamP

    - Using AS 8.2.01 on Windows 10 - IE11.
    in Focus since 1988
     
    Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
    Member
    posted Hide Post
    Thanks Ram/Ginny/GamP....I have been pulled away from this for now, but I will try your suggestion this afternoon and update this topic with my findings.


    WebFOCUS 7.6.9
    Windows Server 2003
     
    Posts: 23 | Location: Nashville | Registered: April 10, 2009Report This Post
    Member
    posted Hide Post
    OK, I am back at this.

    I was referring to the report by name "carfile_by_minsales" but it's physical name is app\kzj1ebai.fex (not sure what that is all about). So I changed it to that. No luck.

    Next I am going to try specifying IBIMR_domain, IBIMR_folder, IBIC_server in the URL too....


    WebFOCUS 7.6.9
    Windows Server 2003
     
    Posts: 23 | Location: Nashville | Registered: April 10, 2009Report This Post
    Virtuoso
    posted Hide Post
    If the procedure you are trying to find is within an MRE domain then there are several other variables that you need to get into the domain structure, including IBIMR_domain, IBIMR_folder, IBIMR_action, IBIMR_sub_action, IBIMR_drill, IBIMR_fex). If the procedure exists on the app path, you only need IBIF_ex parameter (and possibly IBIC_server and authentication parms).


    Regards,

    Darin



    In FOCUS since 1991
    WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
    Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
    WF Client: 77 on Linux w/Tomcat
     
    Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
    Member
    posted Hide Post
    Finally back to trying this out. To add a log to the fire, the report has one name but the physical name of the file is something different. I was hoping that was the issue...it was not.

    Here is the string where I am at now. If anyone sees any brutal flaws, let me know. I appreciate it.

    var varWindowStr = 'http://dcicorwf01/ibi_apps/WFServlet?IBIAPP_app=sandbox&ibic_server=EDASERVE&IBIMR_domain=sandboxk&IBIF_ex=app/kzj1ebai.fex';


    WebFOCUS 7.6.9
    Windows Server 2003
     
    Posts: 23 | Location: Nashville | Registered: April 10, 2009Report This Post
    Virtuoso
    posted Hide Post
    I'm supposing that the procedures are within the MRE environment, but you are still missing most of the required parameters as specified in my last post. You ARE correct that the physical name of the fex file is what needs to specified, not the "nice" report name that appears in MRE.


    Regards,

    Darin



    In FOCUS since 1991
    WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
    Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
    WF Client: 77 on Linux w/Tomcat
     
    Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
    Gold member
    posted Hide Post
    I had the same need and I found this solution that may hep you. FYI... Both my launch HTML page and FEXes are in MRE.

    I have abandoned trying to INCLUDE an MR FEX. But I did find some simple code from BlueZone that does just what I wanted on the forum.

    function runMRProcedure()
    {
    var url = "/ibi_apps/WFServlet?";
    url += "&IBIMR_random=" + Math.random();
    url += "&IBIMR_domain=adminuti/adminuti.htm";
    url += "&IBIMR_action=MR_RUN_FEX&IBIMR_sub_action=MR_STD_REPORT";
    url += "&IBIMR_fex=app/" + document.getElementById("CBO_REPORT").value;
    url += "&IBIF_ex=app/" + document.getElementById("CBO_REPORT").value;
    url += "&IBIMR_flags=&IBIMR_drill=RUNNID";
    url += "&IBIMR_folder=#generaliq2ig";
    location.href = url;
    }

    I referenced this code from a submit button on click event. But it could be referenced from your onclick event of the dropdown. CBO_Report references my dropdown so you would only need to change the name.

    You would also have to change the domain and folder references.

    WARNING: One thing that gave me fits was the way tha MRE handles (or doesn't handle) uppercase characters in object names. You can create a new FEX with upper case in the name and it will display in upper case. But if you look at the file name (preceded by app/) it has only lower case. Once I cleaned that up by using only lower case, everything worked like a dream.


    UPDATE: I found that the code was opening a new window and closing my original HTML page. I resolved this by
    replacing
    location.href = url;
    with
    window.open(url,'_blank');

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


    WebFOCUS 769
    Windows
    all
     
    Posts: 53 | Registered: April 29, 2009Report This Post
    Member
    posted Hide Post
    I have been pulled away again, but back. Today I will try the latest suggestions. Thanks.

    function runMRProcedure()
    {
    var url = "/ibi_apps/WFServlet?";
    url += "&IBIMR_random=" + Math.random();
    url += "&IBIMR_domain=adminuti/adminuti.htm";
    url += "&IBIMR_action=MR_RUN_FEX&IBIMR_sub_action=MR_STD_REPORT";
    url += "&IBIMR_fex=app/" + document.getElementById("CBO_REPORT").value;
    url += "&IBIF_ex=app/" + document.getElementById("CBO_REPORT").value;
    url += "&IBIMR_flags=&IBIMR_drill=RUNNID";
    url += "&IBIMR_folder=#generaliq2ig";
    location.href = url;
    }


    WebFOCUS 7.6.9
    Windows Server 2003
     
    Posts: 23 | Location: Nashville | Registered: April 10, 2009Report 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] Using javascript to redirect to another window and running a FEX

    Copyright © 1996-2020 Information Builders