0

HTML formatting

Hi to all, 

with this formula:

let AR := "Artists";
html("<h1 style='border: 0px solid darkslategray; padding: 11px; font-family: Helvetica; font-size: 10px; color: black; text-align: center; cursor: pointer; background-color: white;' onmouseover='this.style.backgroundColor="#ADD8E6"' onmouseout='this.style.backgroundColor="white"'>" +
AR +
"</h1>")

i am trying to change the color of a button at the mouse passage.

The problem is the syntax of Ninox that requires the use of quotes to switch from the internal code to HTML and vice versa.

And this string: #ADD8E6 together with: white go out from the HTML and are not recognized as Ninox internal language

I tried to introduce slashes \

let AR := "Artists";
html("<h1 style='border: 0px solid darkslategray; padding: 11px; font-family: Helvetica; font-size: 10px; color: black; text-align: center; cursor: pointer; background-color: white;' onmouseover='this.style.backgroundColor=\"#ADD8E6\"' onmouseout='this.style.backgroundColor=\"white\"'>" +
AR +
"</h1>")

 

but it doesn't help.

Has anyone of you encountered problems like this?

 

Thanks in advance

 

2 replies

null
    • Daniel_Berrow
    • 8 mths ago
    • Reported - view

    let AR := "Artists";
    html("<h1 style='border: 0px solid darkslategray; padding: 11px; font-family: Helvetica; font-size: 10px; color: black; text-align: center; cursor: pointer; background-color: white;' onmouseover='this.style.backgroundColor=""#ADD8E6""' onmouseout='this.style.backgroundColor=""white""'>" +
    AR +
    "</h1>")

     

    Try this with the double speech marks on your colours, works for me

      • francescostefanello
      • 8 mths ago
      • Reported - view

      thank you

Content aside

  • Status Answered
  • 8 mths agoLast active
  • 2Replies
  • 87Views
  • 2 Following