Why This Doesn't Work

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18
Код:
var a = {-Variable.Article-};
var encoded = encodeURIComponent(a);
Result is an empty string.
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
var a = project.Variables["Article"].Value;
 

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18
Still doesn't work but never mind. It is related to the XML RCP encoding which i cannot figure out.
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
If you encode your article text then it won't come out right. You will have a bunch of %20 in there for spaces. Hit me up on Skype and we'll get you through this.
 
  • Спасибо
Реакции: Stroks

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18
Thanks. Already got it working thanks to your pm.
 
  • Спасибо
Реакции: bigcajones

Stroks

Client
Регистрация
09.02.2012
Сообщения
219
Благодарностей
14
Баллы
18
There is probably a bug with XMP RCP however I figured it out after another 5 hours.

If one does any http operation operation (I did a URL shortening) before a XML-RCP posting, it simply won't work unless cache and cookies are cleared. I guess it has something to to with cached headers or some other remains of this operation.
 

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