How to create a pop-up window for a dropdown selection

MBarrott
Mega Sage

I have the requirement to display a pop-up window if the user selects "no conversion" in the type field of the demand form. 

 

This pop-up should prompt the user wishes to close out the demand, with a simple cancel/OK option. 

 

If selecting Cancel it should just refresh the page.

 

If selecting OK it should update the state to Closed and make every field non-mandatory. 

 

I know I would need a UI Page and then call it via a GlideDialogWindow in a Client Script but could I get some guidance? 

 

I've not fully figured out how to process the user selection to perform the required action. 

 

What I have so far

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
	<g:ui_form>
		<div>

			No conversion type has been selected, would you like to close out this demand? 

		</div>
		<p>
			<div>
				<button type="cancel" value="Cancel"> Cancel </button>
				<button style="margin-left:15px;" type="submit" value="Ok"> Ok </button>
			</div>
		</p>
	</g:ui_form>
</j:jelly>

 

var dialog = new GlideDialogWindow("NoConversionPopup");


dialog.setSize(400,400);


dialog.setTitle(""); 


dialog.render(); //Open the dialog

 

0 REPLIES 0