I'd like to display a phone number on a page, but I want the characters masked under a switch.
In other words, I want to display a phone number like this:
(***) ***-**** with a checkbox next to it that, when checked, reveals the actual number like this:
(360) 555-1212
No security issues. Just want to mask certain text by default requiring an extra click to reveal.
Hey Ken,
I could not mask as you would like, but would not be too difficult, just need to adapt my User Macro.
You'll need to create a custom macro with the following settings (the required ones):
## @param Name:title=Link|type=string|required=true|desc=Link to Click <script language="javascript"> function toggle() { var ele = document.getElementById("toggleText"); var text = document.getElementById("displayText"); if(ele.style.display == "block") { ele.style.display = "none"; text.innerHTML = "$paramName"; } else { ele.style.display = "block"; text.innerHTML = "hide"; } } </script> <a id="displayText" href="javascript:toggle();">$paramName</a> <div id="toggleText" style="display: none"><h1>$body</h1></div>
Please modify it to your needs, the usage would be, type {hide and select it from the drop-down. Then fill the link you'd like for people to click, could be "Click Me" or "Click to show my Number", and save. Then Place the number or text inside the block of code. And its done.
Hope this helps you, Cheers,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.