Focal Point
[CLOSED].js found, and not found

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

December 03, 2015, 03:27 PM
Neal
[CLOSED].js found, and not found
In a simple .fex this works:
-HTMLFORM BEGIN
 <html>
<HEAD>
	<TITLE> Calendar Popup To Select Date </TITLE> 



<script LANGUAGE="JavaScript" SRC="/approot/baseapp/CalendarPopup.js">

In another (much more complex) this does not. Referencing the needed functions fails here, not above.

I suspect the problem is the Click is from a button in a DIV that is appended in via AJAX. Not sure how to fix.


-HTMLFORM BEGIN
< !DOCTYPE html>
<HTML> <HEAD>  


<script LANGUAGE="JavaScript" SRC="/approot/baseapp/CalendarPopup.js">

The function call in both cases is the same, invoked by a click:

<script LANGUAGE="JavaScript" ID="jscal2x">
var cal2x = new CalendarPopup("testdiv1");
cal2x.setCssPrefix("TEST");
cal2x.showNavigationDropdowns();
cal2x.offsetX = -20;
cal2x.offsetY = 25;
  </SCRIPT> 


Ideas anyone????

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 8
Windows, All Outputs
December 03, 2015, 04:06 PM
Waz
Hi Neal,

Can you please wrap the code tags around any posted code.

Especially with HTML, things aren't displayed.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

December 03, 2015, 04:13 PM
Francis Mariani
http://forums.informationbuild...167095976#4167095976


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
December 03, 2015, 04:23 PM
Neal
now shows html, but there was nothing relevant missing.


WebFOCUS 8
Windows, All Outputs
December 03, 2015, 04:29 PM
Waz
Keep in mind that you may know what is posted and what is relevant, but we only have what we see to go by.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

December 04, 2015, 09:32 AM
Neal
Everything that happens is dynamic. A lot of the html is variable, created by Dialogue Manager, and more of it is appended via Ajax (where the problem happens), and is not visible via 'view source'. The Focus code that is run via Ajax is also determined by DM, based on selections made.
I have a thought that might solve it. Thank you for your patience.
I will get back one way or the other.

Neal


WebFOCUS 8
Windows, All Outputs
December 08, 2015, 08:43 AM
GavinL
Careful with the use of approot. It's not always there as I found out from dev into our preprod. So as things migrate, ... Well just saying, careful.

You mentioned you think it's the onclick, but I don't see any code for onclick.

This executes when the page loads and sets the location of your dropdown.

<script LANGUAGE="JavaScript" ID="jscal2x">
var cal2x = new CalendarPopup("testdiv1");
cal2x.setCssPrefix("TEST");
cal2x.showNavigationDropdowns();
cal2x.offsetX = -20;
cal2x.offsetY = 25;
  </SCRIPT> 




- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server