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

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.