开发者

"Close" button on the page

Is there any possibility to make a link or a button to close the current page? Like I have this:

<div id="arrows">
        <a href="It works"><div id="arrow_left"></div></a>
        <a href="It works too"><div id="arrow_right"></div></a>
        <a href="??? =("><div id="arrow_close"></div></a>   
</div>

And this if it's necessary this:

#arrow_close{
height: 7px;display: inline;float: left;width: 7px;
background: url(../i/close-20.png) no-repeat;
}

And I want to close the page with a butto开发者_如何转开发n "close".


You can use

window.close() or self.close() to close the present window.

To prevent the browser from prompting the warning, you need to set the opener property and then call the close.

<a href="JavaScript:CloseWindow();"><div id="arrow_close"></div></a>
<script type="text/javascript">
var CloseWindow = function() {
  window.top.opener = null;
  window.close();
}
</script>


<a href="javascript:window.close();">

(some browsers won't allow this if the window wasn't opened by a script, depending on the security features enabled)


You can do this inline pretty easily... on a div, you would do

onClick="javascript:window.close();"

But on an <a> tag, you can also do

href="javascript:window.close();"


I came to this page looking for an answer to the question while implementing in-person signing using v6.0.0-rc of the DocuSign.ESign.dll. The error was:

UNKNOWN_ENVELOPE_RECIPIENT "The recipient you have identified is not a valid recipient of the specified envelope"

The answer I found was simple: The signer.Name and signer.Email have to be the same as the view options when you pass control to apiClient.envelopeApi.CreateRecipientView()

Here is the inPersonSigner partial code

   InPersonSigner signer = new InPersonSigner();

    signer.SignerName = signerName;
    signer.HostName = recipientName;

And here is the code to pass control to the browser to begin a signing-session in the same browser.

    RecipientViewRequest viewOptions = new RecipientViewRequest()
    {
        ReturnUrl = "https://www.cnn.com", // your URL here
        ClientUserId = "1234",  
        AuthenticationMethod = "email",
        UserName = signerName,
        Email = signerEmail

    };

    ViewUrl viewUrl = apiClient.envelopeApi.CreateRecipientView(accountId, envelopeSummary.Data.EnvelopeId, viewOptions);

I have no idea if this is enough information to answer your question. I'm assuming that you are running a web page that is signing a document. But instead of sending an email via a DocuSign Signer object, you are doing in-person signing session (on the same browser) using the InPersonSigner object instead. If this isn't what you're doing, then my answer is inappropriate. But it worked for the situation I'm describing. And the question (above) is clearly dealing with DocuSign... possibly an older version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜