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     [CASE-OPENED] Ajax Code Not working in Maintain

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CASE-OPENED] Ajax Code Not working in Maintain
 Login/Join
 
Member
posted
Hi Team,

Thanks for your help so far. I have a searchable drop-down in a maintain data addition form. Done that using Ajax. When the user fills all the textboxes in the form and clicks add . The screen goes blank and i get the scary "eda nodata" message. When i disabled the .js file embedded in the maintain screen. The data addition form works as expected.
Following is a snippet of ajax code used.

 


var xmlHttp = false;

try {
  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (e2) {
    xmlHttp = false;
  }
}
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
  xmlHttp = new XMLHttpRequest();
}

function CallServer(searchString)
{
	// Build the URL to connect to
	var procName = '';
	procName = 'app/searchfundid.fex';
var searchStrings = searchString.toUpperCase();
	var rand = new Date().getTime();
	var url = "WFServlet?IBIMR_domain=domevstr/domevstr.htm&IBIMR_action=MR_RUN_FEX&IBIMR_sub_action=MR_STD_REPORT&IBIMR_fex=" + procName + "&IBIF_ex=" + procName + "&IBIMR_flags=&IBIMR_folder=#evestmentrep&IBIMR_random=" + rand + "&IBIMR_user=a488795&IBIMR_drill=RUNNID&Submit=Submit&VALUE=" + escape(searchStrings) ;

	 // Open a connection to the server
	 xmlHttp.open("GET", url, true);
	// Setup a function for the server to run when it's done
   	xmlHttp.onreadystatechange = PopulateItems;
	 // Send the request
	 xmlHttp.send(null);
}

function PopulateItems()
{
    if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
    {
        var responseXML = xmlHttp.responseXML;
        var trs = responseXML.getElementsByTagName("tr");
		var FUNDDL = null;
        var textIndex=1;
		var valueIndex=0;

		    FUNDDL = document.getElementById('FUNDDL');
			textIndex = 0;
			valueIndex = 1;
			FUNDDL.options.length = 0;
            for (r = 0; r < trs.length; r++)
{
            var tds = trs[r].getElementsByTagName("td");
            optn = document.createElement("OPTION");
            optn.text = tds[textIndex].firstChild.nodeValue;
            optn.value = tds[valueIndex].firstChild.nodeValue;
            FUNDDL.options.add(optn);
               }
			   if ((document.getElementById('EditBox5').value != '') && (FUNDDL.style.visibility == 'visible'))
			 { FUNDDL.selectedIndex = 0;
			 }

}
}


 function text_onchange()
{

	   var FUNDDL = document.getElementById('FUNDDL');

		var EditBox5 = document.getElementById("EditBox5");
		if (FUNDDL.value != '')
        {
		EditBox5.value = '';
		EditBox5.value +=  FUNDDL.value ;
	}

} 

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


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 17 | Registered: October 19, 2010Report This Post
Expert
posted Hide Post
What .js are you disabling ?

Did you know that IBI supplies a js file for xmlhttp ?, its called ibihttpxml.js.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
The IB .js files for ajax also use the variable xmlHttp. They may be tripping over each other. Try renaming that variable as the first step.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Member
posted Hide Post
Hi Alan/Waz ,

Thank you so much for your replies.

Waz - I deleted the ajax code js file i have embedded in the form.

Alan - I have changed the variable name to xmlHttps . Still i get the same eda no data error. I raised a case with IBI 81072519 i got the following response

"Maintain is a persistent environment, you cannot have ajax script embedded in
the form unless you are do a winform show exit. This explain why you are
getting eda no data screen.
"

Any suggestions most welcome


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 17 | Registered: October 19, 2010Report This Post
Master
posted Hide Post
It seems that the statement that you cannot use Ajax with a persistant Maintain application was premature.

We have seen examples where using it with a persistant application works just fine. I know there is a case open for this issue. If you can upload a SMALL reproduction with repro steps, that would be the best thing for us to debug.

Thank you!
Mark Derwin
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Member
posted Hide Post
Hi Mark,

Thank you so much for your reply. If you have access to the IBI case 81072519 , i request you to go through the code and snapshots attached to it. Hmm i dont think the whole code can be loaded in the forum. Will upload the code in the next post.

Your help is much appreciated.

Aravindan


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 17 | Registered: October 19, 2010Report This Post
Expert
posted Hide Post
Arvindia, Mark works for IBI, and IS the Maintain Wizard.

No need to upload code here is you don't want.

I also think that this can be done. As I think I've done it before, but it was a very long time ago.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Hi Mark/Waz

Could you give any hint or suggestion in this regard. I have hit a mini roadblock here , i have implemented this code in Webfocus , but i dont understand why maintain is causing incompatibility issue.

Mark,

We also talked to our customer relations contact Brian Joy regarding this case and suggested your name since you are the maintain pro.

Thank you all for your help

Aravindan


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 17 | Registered: October 19, 2010Report This Post
Expert
posted Hide Post
Are you able to generate a sample maintain app that has this issue, and send it to me ?


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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     [CASE-OPENED] Ajax Code Not working in Maintain

Copyright © 1996-2020 Information Builders