I know i can do this another way, but i want to learn a bit about javascript so I can make templates faster.
I want to check in javascript if a string containts word "Article".
I tested and it doesn't work. The example is in the attachment. Could you help to fix it?
Also what is put into the variable associated with javascript? Maybe the var contains?
Посмотреть вложение test1.xmlz
I want to check in javascript if a string containts word "Article".
Код:
var mystring = {-Variable.PostURL-};
var contains = (mystring.indexOf('Article') > -1);
Also what is put into the variable associated with javascript? Maybe the var contains?
Посмотреть вложение test1.xmlz