Page 1 of 1

Issue with pui.show()

Posted: Thu Mar 16, 2023 10:33 am
by mwalter
I'm trying to use JS to show a message on top of another screen using pui.show(). The display is a universal display/program that basically displays a message and returns a value, which in this application, doesn't do anything. I'm having an issue having the message screen erasing the original screen. Here is the code I'm using.

Code: Select all

function showAlert(itemNumber) {
	debugger;
	ajaxJSON({
		url: "http://iseries.dasinc.com:8080/profoundui/universal/getItemAlertTest",
		params: {
		itemNumber:itemNumber
		},
		method: "get",
		async: false,
		handler: function(ob) {
	      //alert("Success = " + ob.success);
		  if (ob.success == "true") {
			  //alert("printer started");
			  var data = {"CNFBCLTXT":" ",
			                   "CNFBCFTXT":"Ok",
						  "CNFBTNCNVIS":"0",
						  "CNFHDG":"Alert ! !",
						  "CNFLBL":ob.message};
				pui.show({
					path: "PUISRC/QDDSSRC(WMSCONFIRM)",
					screen:"CONFFMTM",
					data:data,
					transition:{"overlay":true},
					handler: function(response){
						if (response["CNFBTNCFM"] == "1") {
							document.body.innerHTML = "";
							return 0;
						}
					}
				});
		  }
		  else {
		   
			return 0;
		  }
		}  



	});
}

Re: Issue with pui.show()

Posted: Thu Mar 16, 2023 1:11 pm
by mwalter
Ok, got the format to overlay, however, when I click the button, it clears everything. I can see why because of the docuemnt.body.innerHTML = " " statement. However, if I remove that, the browser just hangs with a spinning wheel. Now way to close it except to close the entire window. I'd like to have the popup go away and the program take over again.

Re: Issue with pui.show()

Posted: Thu Mar 16, 2023 1:39 pm
by mwalter
So, I guess the question is, "how do you remove a window shown with pui.show()"?