Jump to content

Insert a "Back" or "Close" button on a Single_Page_Update Datapage


Recommended Posts

I've inserted the following into an html block:

 

<input type="button" name="Mod0CancelRecord1" value="CANCEL" class="cbBackButton">

 

And then in the footer i've inserted:

 

document.getElementsByName('Mod0CancelRecord1')[0].onclick = function(){ 

if (confirm("Close Window?")) {
     window.close();
  }
};

 

but unfortunately i've discovered :

Quote

This method can only be called on windows that were opened by a script using the Window.open() method. If the window was not opened by a script, an error similar to this one appears in the console: Scripts may not close windows that were not opened by script.

 

Any ideas or suggestions are welcome

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...