Javascript returns empty values

  • Автор темы Автор темы hubov
  • Дата начала Дата начала

hubov

Новичок
Регистрация
15.07.2014
Сообщения
11
Реакции
0
Баллы
1
Hi,

I have a problem with own code JavaScript. It doesn't return any value in ProjectMaker...
The code is the following:
Код:
Развернуть Свернуть Копировать
var text = {-Variable.page_text-};
var len = text.length;
var wait = Math.floor(len / 1000 + (Math.random() * 10 + 1));
if (wait < 2)
    wait = 2;
wait;
Can you tell me what is wrong?
I found a thread on this forum where an answer for value returning problem was to put at the end the variable which needs to be returned.
I also tried to put the ZP variable in '' like this: '{-Variable.page_text-}' - no effect either.

I tried the code in JavaScript tester - it worked fine (without the ZP variable, of course).

Help me!
 
Код:
Развернуть Свернуть Копировать
var text = "{-Variable.page_text-}";
 
also tried it, in the beginning
no result :(
 
Then your string has more than 1 line and whole code will not work in this case.
 
In fact, that is true. The variable contains the result of HTML->Take text function. Is there any solution for that?
 
Text processing - Replace
What to replace: {-String.Enter-}
with: nothing here
 
worked like a charm!
Thank you for help :)
 
:az:
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)