Hi there.
I would like to encrypt the email-adresses on my website with javascript.
I already received the script from a collegue but have no idea how and where to place it on the page.
Thanks a lot for helping me!
Patrizia
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
Hey
I believe you are asking if you can encrypt the email address that is displayed on the public page of yours. You can use standard pure javascript inside the Page Code part BUT you can't alter the DOM elements on your loaded page.
So I guess that the elements on your page where your e-mail is needs to be like a Text Element and the text is like "Send me an email" and then you will add an onClick event to that text.
Go to your element and click on the onClick + icon and Wix will add the function for you.
Then in that function add the below code
import wixLocation from 'wix-location'; wixLocation.to("mailto:a@b.com?subject=Tips from wixshow.com");
Then the email would not be visible on the page and when someone clicks the text, button or what ever element you use the click action will call wixLocation and mailto: will trigger the mail action.
Is this solution ok for you?
Oh, I got it!
That's how it works:
import wixLocation from 'wix-location'; export function image10_click(event) { wixLocation.to("mailto:a@b.com?subject=Tips from wixshow.com");//Add your code for this event here: }
Thanks a lot!!!
thats how it looks....
Thanks a lot for your help. I guess that would be the solution - but I somehow don't understand where exactly I have to add the code?
After clicking the + I can choose between "code for page" and "code for site" but can't find the onclick element....