Q
Problem solve Get help with specific problems with your technologies, process and projects.

Open next and previous pictures by clicking on buttons

I have a Web application with a form where users can upload pictures, one PR document, and give the picture a title. In a Web view users can then click on the title to open the attachment.

I would like the users to be able to open the next and the previous pictures by clicking on buttons instead of browsing back to the view and opening the next document, but I have not found a way to do this. Can you give me any tips or hints on this?

It looks like you have used passthru HTML in the view to generate the URL of the attached file (where the view would normally just display a link to the document). Of course, if you open a .JPG file in a window by itself, there is no way to add any controls to that, since the JPG file is the entire window contents. You need instead to open a page that displays the image and the buttons. The easiest way to do this is to design a form that's used to display the documents in read mode. Then you can put buttons on the form that use @Command([NavigateNext]) and @Command([NavigatePrev]) to go to the next and previous images. For displaying the image on this page, you could use a formula of passthru HTML such as this:
@If(@AttachmentNames != ""; 
        @Implode("[<img src=\"/" 
+ @WebDbName + "/0/" + @Text
(@DocumentUniqueID) + "/$FILE/" +
 @URLEncode("Domino"; @AttachmentNames) 
+ "\">]"; " "); 
        "" 
) 

In the view, you can just let Domino calculate your URL links to these documents. You would also have to do something to hide the attachment icon, for instance as described hereor here. (But see also this.

You haven't said how you author these documents, but of course they will need to have a very different appearance for editing. You can use text hide properties to hide everything but the image and navigation buttons in read mode, but display everything in edit mode. Or, if you use Notes to author these documents, you can just design different versions of the form for Notes and Web (use the design note properties from the forms view of designer to specify which is which). Or, you can use a form formula in this view to select the form that shows just the picture and buttons, and have another view to display documents using the editing form.

Do you have comments on this Ask the Expert question and response? Let us know.

Dig Deeper on Web Development for Lotus Notes Domino

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close