0

On a customized dispform.aspx page for document library, I'd like to add a delete button. I'm trying this code from SharePoint Designer, but getting error in sharePoint designer 2007

A string literal was not closed.

<a href="javascript: if(DeleteItemConfirmation()) {ddwrt:GenFireServerEvent(concat('__cancel;__delete{',$KeyField,'=',$KeyValue,'};__commit;__redirect={mypage.aspx}))};" >
<img border="0" src="someimage.pgn" alt="delete" width="20" height="20"/>
</a>
1
  • can you write the error? Commented Jul 3, 2013 at 22:29

1 Answer 1

1

You're missing the closing quote for the "concat" (after the closing curly bracket of mypage.aspx) :

<a href="javascript: if(DeleteItemConfirmation()) {ddwrt:GenFireServerEvent(concat('__cancel;__delete{',$KeyField,'=',$KeyValue,'};__commit;__redirect={mypage.aspx}'))};" >
<img border="0" src="someimage.pgn" alt="delete" width="20" height="20"/>
</a>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.