Forum Discussion

MackenziePhilli's avatar
Qrew Trainee
3 years ago

Replace Javascript button code with QB valid language


I was using some some buttons that contained javascript in a rich text formula field displayed a picture of a logo then when clicked brought the user to a link. I need to edit the link associated with these buttons but can no longer use javascript. Is it possible to accomplish this with QB language?

var text url = [structionsite link];
var text iconUrl = "XXXXXXXXXX";

//***********************************Button Styling********************************************

var text iconstyle = "display: flex;"
& "align-items: center;"
& "background: -webkit-linear-gradient(,#??????);"
& "border-radius: 8px;"
& "border-right: 2px Solid #??????;"
& "box-shadow: 0 3px ;"
& "padding: 0px 0px;"
& "color: White;"
& "text-align: center;"
& "text-decoration: none;"
& "display: inline-block;";

"<div style='display:flex; justify-content:center;'>"

& "<a style='"& $iconstyle &"' href='"& $url &"' target="& "'popup' onclick=''"& $url &"','popup');"& "'_self'><img src='"& $iconUrl &"' width='50' height='50'></a>"

& "</div>"

Mackenzie Phillips
No RepliesBe the first to reply