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.
Hi, I am trying to build a onClick function into a hyperlink that passes some XML to a javascript function. The XML is stored in a database and is up to 4000 characters long. There should be no limit to the length of string you can pass through to javascript using the onClick() function, however I am getting the js error "Unterminated string constant". When I view the source I can see that line breaks have been put in to the string after a certain amount of characters which is causing this error. I have tried using the nowrap on the table cell which didnt work. Has anyone got any ideas to help or seen this before? By the way under around 482 characters works fine because it stays on the one line.
Here is some of my fex code:
DEFINE FILE H1
NAMELINK/A4000V = '<a href="java_script:void[0);" onclick="loadXML[''' || XML || ''')">' || NAME || '</a>';
END
TABLE FILE H1
PRINT
NAMELINK AS 'Name'
ON TABLE SET PAGE-NUM OFF
ON TABLE &HoldType AS NODESS10 FORMAT HTML
ON TABLE SET EMPTYREPORT ON
ON TABLE SET STYLE *
TYPE=REPORT, WRAP=OFF, $
ENDSTYLE
END
There may not be a limit to what you can pass in javascript (and I have seenjavascripts of over 20000 characters, so that statement is quite true), but there may very well be limits to what WebFOCUS can process in one line of code. Would it be possible for you to code your javascript as follows:
That way WebFOCUS won't have any problem with it, the javascript still runs and your code is a bit moer manageable. Win-win-win situation I'm thinking...
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
just thought I'd run this in 7.7.01. Guess what? It just runs, no discernable limit on the html lines. I created a code line with over 2700 characters, and it still was put on one line, no breaks. So, I'd advise to upgrade to 7.7.01, that should take car care of this problem anyway.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007