splitting of name

nidheeshnj
nidheeshnj Community Member Posts: 10
I have wrote a Javascript using a external Html object and updated the name. Steps are following



function updateName() {

var me = AICC_Student_Name.getValue();

var a = me.substring(me.indexOf(',')+1, me.length);

var b = me.substring(0, me.indexOf(','));

VartempName = a+', '+b;

alert(VartempName);

}



the VartempName variable value is not getupdated outside the script. May I know the mistake in this code?



Thanks and Regards

Nidheesh