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     Help with onLoad Java command

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Help with onLoad Java command
 Login/Join
 
Member
posted
I've created an HTML launch page with a few parameter dropdown boxes and a submit button.

I created this page using the HTML Layout Painter in Developer Studio 7.1.

Each of the parameter dropdowns have default values supplied for them. I would like the focexec to run automatically when opening the HTML page (without having to click the submit button). The default values I supplied for each of the dropdown boxes would be used in the query.

I've done a little bit of research trying to resolve this problem, and it looks like I need to run the onLoad java function in order to get this to work. I'm not quite sure what the exact syntax for what I am trying to do would be. The examples I've seen are for older versions of Webfocus where you must refer to the Webfocus Form name within the HTML page.

Can anyone help me with what the syntax would be for calling a focexec with the onLoad function for an HTML page created with Webfocus 7.1?
 
Posts: 4 | Registered: June 09, 2005Report This Post
Platinum Member
posted Hide Post
You can include a javascript at the bottom of the htmlpage, which will automatically submit your page to the focus procedure. Or you can call the same as a function OnLoad of the page.

script language="Javascript"
document.form.method="post";
document.form.action="focus procedure name";
document.form.submit();
/script
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Expert
posted Hide Post
One would have to ask why would you want a form if you don't require input to be made before submission?

There are other, less onerous, ways of achieving this sort of thing.

Are you just "playing" and thus becoming more comfortable with the language or is this a real requirement?

If the latter then let us know what you are trying to achieve and I'm sure someone will have an answer or three for you Smiler .
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
In answer to your question, it is actually a little of both. This is a page with 2 frames. I want the results of the report that launches with the page to appear in frame1. That report has drill-down links to a report that will appear in frame2. So the launch page will be visible the entire time. I just want the report to run automatically, because the same parameters will be used in virtually every case. It's nothing critical, I just thought it would be nice if it worked that way. Everything on the page, with the exception of it running the focexec when launched seems to be working.

Also, I'm trying to develop some pages that are a little bit more complex. So I guess I am just sort of playing around with this, trying to see what I can do.

I tried the code that Cyril posted (thank you), but I must be doing something wrong because it still doesn't work. Below is the some of the text of my launch page. Is there something I'm missing?


SCRIPT language="Javascript">
function submitform()
{
document.form.method="post";
document.form.action="vendsel.fex";
document.form.submit();
}
/SCRIPT


Then I call the function with:

BODY onloadd="submitform()"

I had to spell onloadd with two d's to post this reply.
 
Posts: 4 | Registered: June 09, 2005Report This Post
Platinum Member
posted Hide Post
I don't think you can specify the form action like that. It must be the address to the focus procedure. For example i would change the form.action to something like

"http://<servername>/cgi-bin/ibi_cgi/ibiweb.exe?IBIF_ex=procedurename"
or
"http://<servername>/ibi_apps/WFServlet?IBIF_ex=procedurename"

based on the server configuration.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 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     Help with onLoad Java command

Copyright © 1996-2020 Information Builders