custom javascript split not working

This forum contains topics that were moved from Get Satisfaction
David wyatt
Posts: 0
Joined: Mon Sep 15, 2014 7:12 pm

custom javascript split not working

Post by David wyatt »

Hi
i need some help, ive added a custom javascript function to take a variable from an input box called get_sku, split it and combine it differently then show it in a label box called skubox, but i cant get it to work. code is

var userInput = Appery ('inputbox').val();
var b = userInput.split("");

var z = b[0];
var x = b[1];
var q = b[4];
var w = b[5];
var e = b[6];
var r = b[7];
var t = b[8];
var y = b[9];
var c = z + x;
var v = q + w + e + r + t + y;
var skubox = Appery('skubox');
skubox.options['Visible']=v;

can anyone see where ive gone wrong
thanksA

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

custom javascript split not working

Post by Evgene Karachevtsev »

Hello David,

Please use
pre skubox.html(v);/pre
instead of
preskubox.options['Visible']=v;/pre

David wyatt
Posts: 0
Joined: Mon Sep 15, 2014 7:12 pm

custom javascript split not working

Post by David wyatt »

Thank you Evgene, works great now

Post Reply