cancel button not working in iframe but working when using url for the page
- by user1327358
I am working on a form that includes a cancel button. The button correctly closes the form if it is accessed directly through a URL. But once the form is placed in an iframe, the cancel function does not work. Can you please help?
Here is the code:
public class Cancell extends com.ford.forms.types.Button {
/**
* Cancel constructor comment.
*/
public Cancell() {
setImageName("../images/cancel.png");
setOnClickScript("if (confirm('This selection will clear your entries and close this form. Click OK to close this form.')) {document.formApp.Command.value='Cancel';window.close();}");
//setOnClickScript("window.close();");
}
}