Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
help me! cuts the first character of the string. I get number phone on bass 0338050802. and I want to cut the 0.
If string [[0338050802]] .split ("1")
the result will be =338582. and I want it to be 338050802.
Please help me
@taduy1, this requires using slice(), not split().
Execute code:
[[NEW_STR]] = [[STR]].slice(1)
[[STR]] - Variable with a string to be shorten [[NEW_STR]] - Variable with string after shortening
[[STR]]
[[NEW_STR]]
[[TEST-STRING]] == [[TEST-STRING]].substring(0)
SOLVED , I USED set variable only. thanks !!
@tipston244 said in Cannot run javascript from string:
I have set script to a variable: [[SCRIPT]] is set to document.getElementById("donuts").text = "test" but when I use javascript action and set content to [[SCRIPT]] it does not run that script. But if i type "document.getElementById("donuts").text = "test"" directly it will work. Is this a bug
I have set script to a variable: [[SCRIPT]] is set to document.getElementById("donuts").text = "test"
but when I use javascript action and set content to [[SCRIPT]] it does not run that script.
But if i type "document.getElementById("donuts").text = "test"" directly it will work.
Is this a bug
You put the text in a variable and just output it
5623d92e-79d6-4fa6-b843-aa7129aaa1fe-изображение.png
To execute the code represented by a string, use the eval() method https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval
@yourfriendkarol use utf-8 encoding for file
@uraabk It's when taking text from a unicode text file only boxes shows when the text is written out.
@uraabk Thanks, on my phone little bugger hates coding on it Haha.