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] Assigning !IBI.AMP.Variable in Javascript

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Assigning !IBI.AMP.Variable in Javascript
 Login/Join
 
<Smithj2>
posted
Question to all,
Can a !IBI.AMP varialbe be assigned a value in Javascript?
In the following code snippet, Focus fails to pickup the value of the pswd field

I know the reverse is supported (pswd = !IBI.AMP.PWD) so why wont this work?

<script type="text/javascript">
var pswd=prompt ("Please enter your password);
if (pswd==null || pswd=='') {
alert ("Invalid Password" + pswd);
}
else {
alert ("Valid Password" + pswd);
'!IBI.AMP.PWD;' = pswd ;
document.getElementById('field1').value='!IBI.AMP.PWD;' ;
}


Thank you for you comments in advance.

This message has been edited. Last edited by: Kerry,
 
Report This Post
Expert
posted Hide Post
You cannot use JavaScript to assign a value to a WebFOCUS amper variable.

!IBI.AMP.varname; contains the value of the variable, not the variable itself.

To achieve what you want to do, setting a form variable with the value entered in a JS prompt, try
document.getElementById('field1').value=pswd;


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
Platinum Member
posted Hide Post
Bonjour,
Contains the value and not ...
I used to understand How DM and Focus used to exchange (And I really liked it. .EVAL in particular)
As to the links between MRE and Focus, I begin to get in the line, but ...
At this point I come to think that MRE is an addendum to Focus and not really a box of utilitarians present to bring services to Focus at Work.
I can't see how I can tell MRE this is an 'external variable' and please, do that for me.
MRE seems to believe that he know better and will manage all the stuff 'to help me'
I used to know a Boy-Scout who helped old ladies to cross the street, even if they did not want to...
How can one impose (in some rare cases) his will to MRE

On the Other hand, How can an old rubbish Focusian be driven in the wonderland of this brand new world without starting at level 0

How do MRE and the 2 Focuses exchange so that I can understand what happens
Thanks for advice


Focus Mainframe 7.6.11
Dev Studio 7.6.11 and !!!
PC Focus, Focus for OS/2, FFW Six, MSO
 
Posts: 134 | Registered: November 06, 2007Report 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] Assigning !IBI.AMP.Variable in Javascript

Copyright © 1996-2020 Information Builders