Forum Discussion

Re: A button to copy the content of a field to clipboard

Good questions!
Just tried a non-colon name, but to no avail; also, yes, the text I am trying to copy is a special text. It looks like this:

All of the text is also dependent on other things, so it has fields in the formula rich text too. Here is, for instance, the first couple lines:

//START HIGHLIGHT SECTION
    "<p style='font-family: Tahoma, Verdana, Segoe, sans-serif;line-height:0'><span style='font-size:85%; font-weight:bold; background-color:        #FFFF00'>" & "LAT/LONG: " & [Pole Location: Street 1] & "</span></p>"&
//END HIGHLIGHT SECTION

//START BASIC INFO SECTION
    "<p style='font-family: Tahoma, Verdana, Segoe, sans-serif;line-height:0;padding-left:30px'><span style='font-size:85%; font-weight:bold'>Point " & [STB:Point#]     & "</span></p>"&

    "<p style='font-family: Tahoma, Verdana, Segoe, sans-serif;line-height:0;padding-left:30px'><span style='font-size:85%; font-weight:bold'>Tag# " & [Tag #] & "    </span></p>"&

    "<p style='font-family: Tahoma, Verdana, Segoe, sans-serif;line-height:.1;padding-left:30px'><span style='font-size:85%; font-weight:bold'>Location# " &             [Location #] & "</span></p>"&
//END BASIC INFO SECTION

I would be fine with just manual highlighting the text and pasting, but doing that doesn't copy the text color, background, or line spacing I need.

The text field is a formula rich text and has a fid of 165

The table the text field and copy button are located in had dbid of bmwnwyvin.

Here is the code for my copy button:

[iol] & "copybutton.js" & [/iol]
&
"<a id='QBU_Clipboard' class='Vibrant Success' " &
"  data-rid='" & [Pole ID#] & "'" &
">Copy To Clipboard</a>"

Everything works except for the copying. The music plays and the "I Got My Clipboard" popup box shows and nothing else happens. Are you saying the error is in the copy button code? What should I change, if so?
No RepliesBe the first to reply