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     Delete WebFOCUS Cookie from ASP page

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Delete WebFOCUS Cookie from ASP page
 Login/Join
 
Member
posted
I REALLY need an answer to this ASAP.

How do you delete the WebFOCUS cookie prior to creating a new one? I'm calling WebFOCUS reports from an ASP page. Everytime a different report is called, a WFSIGNON is issued. However, unless the browser cache is cleared, the same report is executed.

I tried IBIMR_random.value=Math.floor((Math.random()*100000)) on the ASP page that creates the URL call to WebFOCUS. This prevented some of the ASP pages from working (one where you select items from a list box on the left and pop them into a list box on the right). MR_RANDOM was ignored when I included it on each ASP page for the different reports.

I also tried adding it as a parameter to the URL call to WebFOCUS. That did not work either.

A quick response would be greatly appreciated!!

Jenny Naron
WebFOCUS Support at the FDIC
 
Posts: 18 | Registered: April 10, 2006Report This Post
Expert
posted Hide Post
Jenny,

Try using a non-MRE system variable name:

RNDM.value = Math.floor((Math.random()*100000))


Meanwhile, I'll try to find some code that deletes a cookie.


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
Expert
posted Hide Post
JavaScript to delete a cookie:

DeleteCookie("COOKIE_NAME","/");


DeleteCookie function:
function DeleteCookie (name,path,domain)
{
document.cookie = name + "=" +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}


I hope this works.

A good description about cookies:

Elated: Tutorial: JavaScript and cookies

This message has been edited. Last edited by: Francis Mariani,


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
Member
posted Hide Post
Should't this work in ASP/VBScript code?

document.cookie = "name=WF_USER; & expires=Thu, 01-Jan70 00:00:01 GMT";

I know this is not an APS/VBScript site but that developer at my site is not being helpful.

When I put this code in right before setting document.action, the rest of the ASP page doesn't work.
 
Posts: 18 | Registered: April 10, 2006Report This Post
Member
posted Hide Post
One more thing...the ASP developer put in "randomizer" code but WebFOCUS did not respect it.
 
Posts: 18 | Registered: April 10, 2006Report This Post
Expert
posted Hide Post
What does the URL of the WebFOCUS call look like?


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
Member
posted Hide Post
Here's the ASP that is used to build the WebFOCUS call...


<%
Sub WebFocusSetup()
	%>
	<input type="hidden" name="IBIC_server" value="DB2SERVE">
	<input type="hidden" name="ACF2_user" value="stdDSCHRSActRptID">
	<input type="hidden" name="ACF2_pass" value="<%=Application["DSCHRS_DB_PWD")%>">
	<input type="hidden" name="APPNAME" value="dschrs_app">
	<input type="hidden" name="IBIC_user" value="">
	<input type="hidden" name="IBIC_pass" value="">
	<input type="hidden" name="RNDM" value="">
	<input type="hidden" name="IBIWF_action" value="WF_SIGNON">
	<input type="hidden" name="WF_SIGNON_MESSAGE" value="http://entwfdevl/ibi_apps/WFServlet?IBIF_ex=dsc00rp0">
	<%
	If Session("Test")="Y" Then
		Response.write "                  "
		Response.write "<input type=radio name=ReportType value=1>Actuate</input>"
		Response.write "<input type=radio name=ReportType value=2 checked>WebFocus</input>"
	End If
End Sub

Sub SubmitForm(ActuateReportName,WebFocusReportName)
	%>
	if document.forms(0).ReportType(1).checked then
		document.forms(0).action = "<%=WEBFOCUS_SERVER%>IBIWF_action=WFSIGNON&IBIC_user=&IBIC_pass=&IBIC_server=DB2SERVE&APPName=dschrs_app&RPTNME=<%=WebFocusReportName%>&ACF2_user=stdDSCHRSActRptID&ACF2_pass=<%=Application["DSCHRS_DB_PWD")%>&WF_SIGNON_MESSAGE=http://entwfdevl/ibi_apps/WFServlet?IBIF_ex=dsc00rp0"
		msgbox(document.forms(0).action)
		'document.forms(0).action = "<%=WEBFOCUS_SERVER%>RPTNME=<%=WebFocusReportName%>"
	else
		document.forms(0).action = "<%=ACTUATE_SERVER%>Sharp/<%=ActuateReportName%>?Submit"
	end if
	document.forms(0).submit
	<%
End Sub
%>

This message has been edited. Last edited by: Kerry,
 
Posts: 18 | Registered: April 10, 2006Report This Post
Member
posted Hide Post
I think some code was dropped...I prefaced each line with // to try to get everything included so please ignore them...

//<%
//Sub WebFocusSetup()
//	%>
//	<input type="hidden" name="IBIC_server" value="DB2SERVE">
//	<input type="hidden" name="ACF2_user" value="stdDSCHRSActRptID">
//	<input type="hidden" name="ACF2_pass" value="<%=Application["DSCHRS_DB_PWD")%>">
//	<input type="hidden" name="APPNAME" value="dschrs_app">
//	<input type="hidden" name="IBIC_user" value="">
//	<input type="hidden" name="IBIC_pass" value="">
//	<input type="hidden" name="RNDM" value="">
//	<input type="hidden" name="IBIWF_action" value="WF_SIGNON">
//	<input type="hidden" name="WF_SIGNON_MESSAGE" value="http://entwfdevl/ibi_apps/WFServlet?IBIF_ex=dsc00rp0">
//	<%
//	If Session("Test")="Y" Then
//	
//Response.write "                  "
//		Response.write "<input type=radio name=ReportType value=1>Actuate</input>"
//		Response.write "<input type=radio name=ReportType value=2 checked>WebFocus</input>"
//	End If
//End Sub
//
//Sub SubmitForm(ActuateReportName,WebFocusReportName)
//	%>
//	if document.forms(0).ReportType(1).checked then
//		
//document.forms(0).action = "<=WEBFOCUS_SERVER%>IBIWF_action=WFSIGNON&IBIC_user=&IBIC_pass=
//&IBIC_server=DB2SERVE&APPName=dschrs_app&RPTNME=<%=WebFocusReportName>&ACF2_user=stdDSCHRSActRptID&
//ACF2_pass=<%=Application["DSCHRS_DB_PWD")%>&WF_SIGNON_MESSAGE=http://entwfdevl/ibi_apps/WFServlet?
//IBIF_ex=dsc00rp0"
//		msgbox(document.forms(0).action)
//		'document.forms(0).action = "<%=WEBFOCUS_SERVER%>RPTNME=<%=WebFocusReportName%>"
//	else
//		document.forms(0).action = "<%=ACTUATE_SERVER%>Sharp/<%=ActuateReportName%>?Submit"
//	end if
//	document.forms(0).submit
//	<%
//End Sub
%>

This message has been edited. Last edited by: Kerry,
 
Posts: 18 | Registered: April 10, 2006Report This Post
Member
posted Hide Post
It looks like it still dropping. I can email you the fle if you need more.
 
Posts: 18 | Registered: April 10, 2006Report This Post
Expert
posted Hide Post
I don't know anything about ASP of VBScript. I was hoping to see the URL as a result of the submit. Usually you can right-click the web browser window with the WebFOCUS report and select properties to view the URL of the window.


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
Jenny,

You are relying on the redirect of a successful logon to execute your request. All your current attempts to add a random number will be futile. You need to assign the random parameter and value of WF_SIGNON_MESSAGE, as that is the actual url that will be sent to WebFOCUS for final processing.

In your form, make WF_SIGNON_MESSAG="http://entwfdevl/ibi_apps/WFServlet?IBIF_ex=dsc00rp0&RNDM=<%=whatEverYouCalledIt%>", then your problems should be solved (I did a quick test to verify).

As for the other action where you over wright the forms action, you will probably have to encode the WF_SIGNON_MESSAGE value to ensure that the RNDM=??? does not get passed to the called action. If this were JavaScript, I would use the escape() function to encode a value. I don't have a clue what you need to do with VBScript to do the same thing.

Does this make any sense?


"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
Member
posted Hide Post
Yes it does. I almost tried putting the RNDM value in the WF_SIGNON_MESSAGE string yesterday. Another question:

This is my URL call:

document.forms(0).action = "<%=WEBFOCUS_SERVER%>IBIWF_action=WFSIGNON&IBIC_user=&IBIC_pass=&IBIC_server=DB2SERVE&APPName=dschrs_app&RPTNME=<%=WebFocusReportName%>&ACF2_user=stdDSCHRSActRptID&ACF2_pass=<%=Application["DSCHRS_DB_PWD")%>&WF_SIGNON_MESSAGE=http://entwfdevl/ibi_apps/WFServlet?IBIF_ex=dsc00rp0"

I would make it:

document.forms(0).action = "<%=WEBFOCUS_SERVER%>IBIWF_action=WFSIGNON&IBIC_user=&IBIC_pass=&IBIC_server=DB2SERVE&APPName=dschrs_app&RPTNME=<%=WebFocusReportName%>&ACF2_user=stdDSCHRSActRptID&ACF2_pass=<%=Application["DSCHRS_DB_PWD")%>&WF_SIGNON_MESSAGE=http://entwfdevl/ibi_apps/WFServlet?IBIF_ex=dsc00rp0&RNDM="

I still need to add the code to generate the random number correct?
 
Posts: 18 | Registered: April 10, 2006Report This Post
Virtuoso
posted Hide Post
No and Yes.

Yes, you would still have to add the random number you are generating.

No, you cannot make your action as stated. If you change your action to your example, then the RNDM would be passed to the requested original action and not the redirect. You would need to escape the entire value of WF_SIGNON_MESSAGE to ensure that the RNDM gets passed to the redirected url. To keep it really simple, you need to change the &RNDM= to %26RNDM=. The %26 will force the '&' to be left alone and passed to the redirect, thereby ensuring that the redirected call will receive the parameter and its unique value.

Add your random number to the end of the following:
document.forms(0).action = "<%=WEBFOCUS_SERVER%>IBIWF_action=WFSIGNON&IBIC_user=&IBIC_pass=&IBIC_server=DB2SERVE&APPName=dschrs_app&RPTNME=<%=WebFocusReportName%>&ACF2_user=stdDSCHRSActRptID&ACF2_pass=<%=Application["DSCHRS_DB_PWD")%>&WF_SIGNON_MESSAGE=http://entwfdevl/ibi_apps/WFServlet?IBIF_ex=dsc00rp0%26RNDM="


"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
Member
posted Hide Post
I'll try your example. The following also works:

randomize()
RndmNumber = int((100000*Rnd)+1)
document.forms(0).WF_SIGNON_MESSAGE.value = document.forms(0).WF_SIGNON_MESSAGE.value & "&RNDM=" & RndmNumber
msgbox(document.forms(0).WF_SIGNON_MESSAGE.value )
>IBIWF_action=WFSIGNON&IBIC_user=&IBIC_pass=&IBIC_server=DB2SERVE&APPName=dschrs_app&RPTNME=<%=WebFocusReportName%>&ACF2_user=stdDSCHRSActRptID&ACF2_pass=<%=Application["DSCHRS_DB_PWD")%>&WF_SIGNON_MESSAGE=http://entwfdevl/ibi_apps/WFServlet?IBIF_ex=dsc00rp0&RNDM=" & int((100000*Rnd)+1)
document.forms(0).action = "<%=WEBFOCUS_SERVER%>IBIWF_action=WFSIGNON&IBIC_user=&IBIC_pass=&IBIC_server=DB2SERVE&APPName=dschrs_app&RPTNME=<%=WebFocusReportName%>&ACF2_user=stdDSCHRSActRptID&ACF2_pass=<%=Application["DSCHRS_DB_PWD")%>"
msgbox(document.forms(0).action)


The ASP pages reside on a difference web server than WebFOCUS. Any idea why the drop-down arrow of the BACK button in the browser must be used to navigate back to the ASP launch page from the WebFOCUS report? Redirection for PDF is turned off in WebFOCUS. The same behavior occurs if the report is generated in HTML format.
 
Posts: 18 | Registered: April 10, 2006Report This Post
Member
posted Hide Post
The problem with the back button does not occur from an HTML page. I made sure that target=_self was set on the form in the ASP page.
 
Posts: 18 | Registered: April 10, 2006Report This Post
Virtuoso
posted Hide Post
In your case, what is happening is that the redirect (probably an http 302) is forcing your browser to actually issue two url requests. The first one is the action you define, the second url is the value of WF_SIGNON_MESSAGE. This means that you have 2 urls in your browser history. When you click the back button, the original url is invoked, causing the second url to be automatically called. Bit of an endless loop type of thing.

You should be able to control this by putting a hyperlink in your report that does a javascript call to go two steps back in your history. You'll have to verify the actual syntax, but I believe it is something like history(-2) .... try google if you want to implement this.


"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
Member
posted Hide Post
I think if I can get the WF_SIGNON_MESSAGE on the saem call as WFServlet, the intermediate page won't be created. However, when I use the following code, WebFOCUS says the focexec procedure cannot be found . I suspected that dsc00rp0 is not getting passed/interpreted.

randomize
RndmNumber = int((100000*Rnd)+1)
document.ActiveEventsRpt.action = "<%=WEBFOCUS_SERVER%>IBIWF_action=WFSIGNON&IBIC_user=&IBIC_pass=&IBIC_server=DB2SERVE&APPName=dschrs_app&RPTNME=<%=WebFocusReportName%>&ACF2_user=stdDSCHRSActRptID&ACF2_pass=dschrspass&WF_SIGNON_MESSAGE=http://entwfdevl/ibi_apps/WFServlet?IBIF_ex=dsc00rp0%26RNDM=" & int((100000*Rnd)+1)
msgbox(document.ActiveEventsRpt.action)

I'v never coded in ASP/VBScript so I'm sure it's a syntax problem. Any ideas?
 
Posts: 18 | Registered: April 10, 2006Report This Post
Virtuoso
posted Hide Post
I suspect that the focexec does not exist on your apppath. You should add the focexec's application directory to the signon url thusly:

WF_SIGNON_MESSAGE=http://entwfdevl/ibi_apps/WFServlet?IBIF_ex=dsc00rp0%26IBIAPP_app=appname%26RNDM=

Please replace appname with the appropriate application name.


"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
Member
posted Hide Post
The focexec is on the app path.

The customer decided to open the WebFOCUS reports in a new browser instance from ASP to URL calls are fine.

Thanks for all you help!
 
Posts: 18 | Registered: April 10, 2006Report This Post
Member
posted Hide Post
The customer wants to be able to call 2 WebFOCUS reports from ASP without having to close the first one. The reports are being displayed in the PDF plug-in in a new browser instance. The following document.action value works for the first report, but not for the second (unless I close the first one out):

document.ActiveEventsRpt.action = "<%=WEBFOCUS_SERVER%>RPTNME=dsc01rp1&IBIWF_action=WFSIGNON&IBIC_user=&IBIC_pass=&IBIC_server=DB2SERVE&APPName=dschrs_app&ACF2_user=stdDSCHRSActRptID&ACF2_pass=dschrs0307&WF_SIGNON_MESSAGE=http://entwfdevl/ibi_apps/WFServlet?IBIF_ex=dsc00rp0%26RNDM=" & RndmNumber


It does not work when the reports are display in HTML either. In HTML, I have to hit the refresh button.
 
Posts: 18 | Registered: April 10, 2006Report This Post
Member
posted Hide Post
Any ideas why the above call to WebFOCUS cannot be issued 2X, one right after the other without closing the first report?
 
Posts: 18 | Registered: April 10, 2006Report This Post
Expert
posted Hide Post
If you had two WebFOCUS calls run in the same window, wouldn't the result of the second replace the result of the first? You wouldn't be able to see the result of the first.

The only way to do this is to either open a page with two frames or open two windows.


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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Delete WebFOCUS Cookie from ASP page

Copyright © 1996-2020 Information Builders