Issue with pui.show()

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
mwalter
Experienced User
Posts: 140
Joined: Wed Sep 14, 2016 2:58 pm
First Name: Mark
Last Name: Walter
Company Name: Paragon Consulting Services
Contact:

Issue with pui.show()

Post 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;
		  }
		}  



	});
}
mwalter
Experienced User
Posts: 140
Joined: Wed Sep 14, 2016 2:58 pm
First Name: Mark
Last Name: Walter
Company Name: Paragon Consulting Services
Contact:

Re: Issue with pui.show()

Post 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.
mwalter
Experienced User
Posts: 140
Joined: Wed Sep 14, 2016 2:58 pm
First Name: Mark
Last Name: Walter
Company Name: Paragon Consulting Services
Contact:

Re: Issue with pui.show()

Post by mwalter »

So, I guess the question is, "how do you remove a window shown with pui.show()"?
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests