cancel
Showing results for 
Search instead for 
Did you mean: 

pdf in HWC

Former Member
0 Kudos

Hi,

I have a hyperlink to a PDF in one of my HTMLviews in my workflow screen. When I touch on this link (in iPad/iPhone), the HWC loads and render the PDF beautifully in its content pane. Now the issue is that I do not have a way to go back to the previous page. There is no back/cancel button. So practically this functionality is useless. Is there any way I could load the PDF in a new window? The target attribute of the A tag or the javascript window.open etc do not work in HWC. And none of the jquery mobile popups that I tried worked(most of the sample available on the Net requires a later version of jquerymobile than the 1.0 used in HWC. Please suggest a solution.

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

midhun_vp
Active Contributor
0 Kudos

May I know the code that you used for showing the attachment?

Is it a custom code?

Use the standard code provided by SAP for showing the attachments once the user clicks on the hyperlink you are talking about. It will then pop the attachment as you required.

function viewAttach(i){

 

          var message = getCurrentMessageValueCollection();

            var itemList = message.getData("Attachments"); //MBO related to the attachment.

            var items = itemList.getValue();

            var numOfItems = items.length;

             var currItem= items[i];

             var LS_OUTPUTX =0;

             var FILENAME = currItem.getData("Attachments_FILENAME_attribKey").getValue();

             var MIMETYPE = currItem.getData("Attachments_MIMETYPE_attribKey").getValue();

             var LS_OUTPUTX = currItem.getData("Attachments_LS_OUTPUTX_attribKey").getValue();

          showAttachmentContents(LS_OUTPUTX, MIMETYPE, FILENAME);

          clearCache();

          return false;

}

Former Member
0 Kudos

Hi Sajesh,

Please try the bellow mention html snippet which is generic HTML to both mobile as well as web

<FORM><INPUT TYPE="BUTTON" VALUE="Back" ONCLICK="history.go(-1)"></FORM>

Regards,

Srinivas Divakarla