Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I want to close a HTML from

Status
Not open for further replies.

rummage

MIS
Apr 8, 2003
33
US
Hi,

I want to close a HTML from from Webfocus. What is the syntax?

Thanks
Thambaiya
 
Hi!

HTML embedding goes like this:

-HTMLFORM BEGIN

<form action=&quot;ibi.exe&quot; method=&quot;post&quot;>
...
</form>

-HTMLFORM END

Hope this helps
Eva
 
Hi Eva,

Probably, I did not tell you properly what I wanted to say. From a HTML form, I am excutig a FEX procedure. At the end of the FEX procedure, I want to close this HTML form that invoked the FEX procedure. Basicaaly, I need to close the HTML form that executed the FEX procedure from the FEX procedure itself.

Thanks
Thambaiya
 
Hi Eva,

This is my situation. I will include the code also.

I have a HTML form that is used for accessing the reporting information from WebFocus.

After I have seen the reports, I click a button called 'Clean Up and Close' on the HTML form. When I click the button, it is supposed to execute a FEX procedure that would trigger a SQL stored procedure which will clean up the temporary reporting data on the temporary tables in SQL Server database. In addition to that, the HTML form needs to be closed. The user that clicked the button would not see anything on his screen except for the closing of the HTML form.

Now the HTML/Javascript code that I did for the 'Clean Up and Close' button:

<input type=&quot;button&quot; value=&quot;Clean Up and Close&quot; name=&quot;cmdReport&quot; onClick=&quot;ExecuteFEX()&quot;>


function ExecuteFEX()
{

window.location.href = &quot;///c:/cgi-bin/ibi_cgi/ibiweb.exe?ibif_ex=dpciin&ibiapp_app=(local)&quot;;

}

--Where 'dpciin' is the FEX procedure.

Now the 'dpciin' FEX procedure follows:


-* File DPCIIN.FEX

-* CALL THE SQL PROCEDURE TO TRUNCATE THE TABLES

-SET &TODAY=&YMD;
-SET &AJB = GETUSER(A8);
-TYPE USER &AJB

-TYPE &DATE

-SET &SESSIONID = &AJB || &TODAY || 'AAAAAAAAAAAAAAAAAAAAAAA';



SQL SQLMSS


EX GOA01_SQL.dbo.spgoa_dropusertables ,
'&SESSIONID';


END



- Now I want to close the HTML form from which I invoked the above procedure (In that form only, we had the button 'Clean Up and Close'. Can we do the coding of closing the HTML form in the above WebFocus procedure.

Thanks
Thambaiya
 
Hi Thambaiya,

How to close the HTML form window... I guess this should work:

1.) Give the HTML form window a name with JavaScript
var myName = 'anything';
window.name = myName;

2.) Transmit the windows name to the fex via a hidden field in the form and catch it in a JavaScript section in the FEX.
I’m not sure whether you need to do this. Try step 3 first and if it doesn’t work try transmitting the window name.

2.) Include some JavaScript at the end of your FEX that cleans up all the temporary data from the report and in the database:
[tt]
-HTMLFORM BEGIN
<script language=&quot;JavaScript&quot;>
myName.close();
self.close();
</script>
-HTMLFORM END
[/tt]

Best wishes
Eva
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top