Button with JavaScript functions

Hi, would like to see if anyone could have a straight forward solution for the following situation.

The page

I have got stuck with two Buttons:

  1. bookmark - what I want is user click on this button and then the current webpage could be bookmarked since there is no independent button block, therefore, I am using a list detail block and map it to an airtable field to store the trigger code (I couldn’t find any workable one for the time being) :sweat_smile: to invoke the function as per below:
function saveBookmark() {
    var bookmarkName = document.title;
    var bookmarkURL = window.location.href;
    if (window.sidebar && window.sidebar.addPanel) { // Firefox
        window.sidebar.addPanel(bookmarkName, bookmarkURL, "");
    } else if (window.external && ('AddFavorite' in window.external)) { // IE
        window.external.AddFavorite(bookmarkURL, bookmarkName);
    } else if (window.opera && window.print) { // Opera
        var elem = document.createElement('a');
        elem.setAttribute('href',bookmarkURL);
        elem.setAttribute('title',bookmarkName);
        elem.setAttribute('rel','sidebar');
        elem.click();
    } else if (window.chrome && window.chrome.bookmarks) { // Chrome
        chrome.bookmarks.create({title: bookmarkName, url: bookmarkURL});
    } else {
        alert("Your browser doesn't support this feature. Please use your browser's bookmarking system.");
    }
}
  1. As for the 2nd button, I have found the flwg: https://www.unlock-softr.com/tip/softr-add-a-copy-to-clipboard-field/r/reczsamGxpWAvNvqB

I give a try on a block as per said, but I only the layout there, and no effect comes up when I pressed it like the below pic.

Anything I missed so that the action function could not be triggered? Just want to ask if this function can be applied on table? I believe it should be OK.

Hope to have some advise those Masters! :pray: Tks in advance.

I have just tried with Table, it doesn’t work, probably, the fields of the table do not support html code.

image

Is there any workaround that can serve this purpose? What I want is to copy the text on the left hand side to clipboard.

nocode.ie has a few great tutorials on youtube and in their online community… Might be helpful to see how they have configured Level Up Your Softr No-Code App Build With Action Buttons | Softr.io Tutorial 2022 - YouTube

but I don’t know about the copy action. Try the softr tools Awesome list of SOFTR tips portal, might also have some helpful nuggets!

Yes, I am actually following what has been told, but I am not sure why it gives no response when pressing the button.

You can give a try Page Link