Focal Point
[CLOSED] Read/Write cookies?

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

April 03, 2015, 01:51 PM
GavinL
[CLOSED] Read/Write cookies?
From a WebFOCUS report, can I read or write cookies? I'm unable to find anything on it, so I'm guessing not.

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



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
April 06, 2015, 07:11 PM
Crymsyn
I just tested a simple cookie example using JavaScript (copy pasted from w3schools) and it worked without issue.

Would have to be part of the HTML page so I don't think could use the auto-prompter. Other than that I don't see why wouldn't be able to unless there is security or user settings overriding them.


WF: 8201, OS: Windows, Output: HTML, PDF, Excel
April 08, 2015, 12:56 PM
GavinL
Yea, I can use JavaScript to read/write, but what I'm trying to do is have JavaScript or WebFOCUS read a cookie and use it as a parameter within a where clause.

Since currently portal pages, can't pass params to other portal pages, we write things to public session variables "&&MYVAR" that can only be seen by the user executing it. We had some Magnify stuff, that when click were setting these public variables, but looks as if Magnify is within it's own session and the public variables would be _FOC_NULL once a new portal page was opened. Since that time we found a way around all that, by going through "/ibi_apps/WFServlet.ibfs?IBIF_webapp=/ibi_apps&|IBIC_server=EDASERVE" instead.. We thought cookies would of been a good opportunity if it worked.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
April 08, 2015, 07:20 PM
Crymsyn
Well I'll need to test to make sure but it might be possible with a custom HTML page to add a hidden input like it does with the amper variable ibif_ex for example.

That way it would be passed to a report as a variable and could be used as normal.

Then to store should be able to use something like !IBI.AMP.(variable) in the javascript to get the value. This is one of the posts I've seen the above from:
[SOLVED] Passing a parameter to an html composer file

I'll try to get an example together tomorrow but thought if there is a time restraint might be a place to start at least. Plus since I am not using WebFOCUS 8 yet there may be some differences.


WF: 8201, OS: Windows, Output: HTML, PDF, Excel