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     [Solved] Spaces in a JavaScript call

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] Spaces in a JavaScript call
 Login/Join
 
Silver Member
posted
In the focexec below there are three buttons. Button 1 produces the correct alert however Button 2 and Button 3 produce an "Unterminated string constant" error. How do you pass spaces to a JavaScript function? Thanks


-* File joe_test.fex
APP HOLDDATA
-RUN
SQL PREPARE XXXX FROM
SELECT *
FROM TRVDEV3.DOCLISTV A
    ,TRVDEV3.PNDVTOPV B
    ,TRVDEV3.PNDVLNEV C
WHERE DL_DOCNO=VT_DOCNO
  AND VT_DOCNO=VL_DOCNO
  AND VT_DOCNO = '46236116'
  ORDER BY VL_DOCNO;
END
-RUN
DEFINE FILE XXXX
NUM/I3=LAST NUM+1;
LNUM/A20= 'item' || EDIT(NUM);
XFY/A200='<input name="XFY' || EDIT[NUM) | '" value="' || VL_FY || '">' ;
XFUND/A200='<input name="XFUND' || EDIT[NUM) | '" value="' || VL_FUND || '">' ;
XACTCLASS/A200='<input name="XACTCLASS' || EDIT[NUM) | '" value="' || VL_ACTCLASS || '">' ;
XPROGALIAS/A200='<input name="XPROGALIAS' || EDIT[NUM) | '" value="' || VL_PROGALIAS || '">' ;
XPROJALIAS/A200='<input name="XPROJALIAS' || EDIT[NUM) | '" value="' || VL_PROJALIAS || '">' ;
XCASEALIAS/A200='<input name="XCASEALIAS' || EDIT[NUM) | '" value="' || VL_CASEALIAS || '">' ;
XRCNALIAS/A200='<input name="XRCNALIAS' || EDIT[NUM) | '" value="' || VL_RCNALIAS || '">' ;
BUTTON1/A2000='<INPUT id=button1 style="Z-INDEX: 1; LEFT: 170px; WIDTH: 50px; TOP: 110px; HEIGHT: 30px" tabIndex=1 type=button value=Button1 name=button1 onclick=window.alert["testing");>' ;
BUTTON2/A2000='<INPUT id=button2 style="Z-INDEX: 1; LEFT: 170px; WIDTH: 50px; TOP: 110px; HEIGHT: 30px" tabIndex=1 type=button value=Button2 name=button2 onclick=window.alert["testing xxx");>' ;
BUTTON3/A2000='<INPUT id=button3 style="Z-INDEX: 1; LEFT: 170px; WIDTH: 50px; TOP: 110px; HEIGHT: 30px" tabIndex=1 type=button value=Button3 name=button3 onclick=window.alert["testing' | ' xxx");>' ;
END
TABLE FILE XXXX
PRINT XFY 
      XFUND 
      XACTCLASS 
      XPROGALIAS 
      XPROJALIAS 
      XCASEALIAS 
      XRCNALIAS 
      VL_SUBAMT 
      VL_AUDAMT 
      VL_S 
BY VL_LINENO 
FOOTING
"<BUTTON1 <BUTTON2 <BUTTON3"
ON TABLE HOLD AS HOLD2 FORMAT HTMTABLE
END
-RUN
-HTMLFORM BEGIN
<HTML>
<HEAD>
<TITLE>HtmlPage</TITLE>
<script id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
UpdateData();
// TODO: Add your event handler code here
}
//End function window_onload
</SCRIPT>
</HEAD>
<BODY>
!IBI.FIL.HOLD2;
</BODY>
</HTML>
-HTMLFORM END
-RUN

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


Linux/zVM/WF7.6.11
 
Posts: 29 | Location: Washington DC | Registered: June 06, 2008Report This Post
Expert
posted Hide Post
Pleas put your code between
[code]
and
[/code]
tags so we can see your HTML as code.


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
<JG>
posted
The onClick actions are incorrectly coded

 
BUTTON1/A2000='<INPUT id=button1 type=button value=Button1 name=button1 onClick="window.alert(''testing'');">' ;
BUTTON2/A2000='<INPUT id=button2 type=button value=Button2 name=button2 onClick="window.alert(''testing xxx'');">' ;
BUTTON3/A2000='<INPUT id=button3 type=button value=Button3 name=button3 onClick="window.alert(''testing xxx'');">' ; 
 
Report This Post
Silver Member
posted Hide Post
Thanks! the button works now! joe


BUTTON2/A2000='<INPUT id=button2 style="Z-INDEX: 1; LEFT: 170px; WIDTH: 50px; TOP: 110px; HEIGHT: 30px" tabIndex=1 type=button value=Exit name=button2 onclick="alert(''testing xxx'');">' ;



Linux/zVM/WF7.6.11
 
Posts: 29 | Location: Washington DC | Registered: June 06, 2008Report This Post
<JG>
posted
Joe, no problem

However please do us all a favour and edit your original post to put the
[CODE][/CODE] tags around the source.

That way everyone will be able to read it and it will remove the javascrit errors that are
being generated.
 
Report 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     [Solved] Spaces in a JavaScript call

Copyright © 1996-2020 Information Builders