How can I click on one of the image or document generate using script editor to bring up another page or webpart in SharePoint 2019?

Tanzim Shaikh 121 Reputation points
2021-08-31T07:15:36.067+00:00

Hello,
We are using SharePoint 2019 and we have a script editor webpart that generates images from PDF book.
Now we want that when the user clicks on any of the book, a page or a section or a webpart should open for him to enter the Ratings and Comments on that book.

Can we achieve this through coding. Please help.
Thank you

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,590 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tanzim Shaikh 121 Reputation points
    2021-09-02T09:41:52.39+00:00

    Hello Michael,

    It alerts each book name when I click on the image.
    However, I need the comments page to be opened while we are on the same page and the books are in the background. There the user will enter the comment and rating for the book and then close the page (you know like a people picker page, a small window opens in the background and then when done it closes and we return to the previous page).

    Note: It is taking me time to post the replies because I am facing the error "Access denied. You don't have permission to access ..." whenever I clicks on the "Post Your Answer" button.

    Thank you


4 additional answers

Sort by: Most helpful
  1. MichaelHan-MSFT 18,021 Reputation points
    2021-09-07T09:14:15.84+00:00

    @Tanzim Shaikh ,

    Ok, then you could put the comments and ratings in a same list "Comments". For rating, you could enable rating feature in list settings >rating settings.

    And you need to set the title of the list item to be the book name.

    1 person found this answer helpful.

  2. MichaelHan-MSFT 18,021 Reputation points
    2021-09-01T02:55:30.737+00:00

    Hi @Tanzim Shaikh ,

    You could use js code to add a onclick event on the images, when the image is clicked, call the function to open a page for the user to enter the Ratings and Comments on that book.

    For example:

    128115-image.png


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Tanzim Aftab 1 Reputation point
    2021-09-02T09:38:58.96+00:00

    Hello Michael,
    I am not able to post replies.

    0 comments No comments

  4. Tanzim Shaikh 121 Reputation points
    2021-09-02T09:46:53.597+00:00

    I think there is a problem in the website accepting any code. I am not able to post any reply when I am using code sample button with the reply.
    Please find below the image that was trying to post in my previous reply:

    128615-image-for-microsoft-reply.png

    0 comments No comments