This topic is locked

address state city zip to full address

2/17/2014 2:54:14 PM
PHPRunner General questions
S
stanbar1 author

Hi

i.m not so good on php, but i study

i try to put (address state zip apt#)to pickupaddress

this code what i use onload
var ctrlApt# = Runner.getControl(pageid, 'Apt#');

var ctrlState/Province: = Runner.getControl(pageid, 'State/Province:');

var ctrlAddress: = Runner.getControl(pageid, 'Address:');

var ctrlCity: = Runner.getControl(pageid, 'City:');

var ctrlZip: = Runner.getControl(pageid, 'Zip:');

var ctrlPickUpAddress = Runner.getControl(pageid, 'PickUpAddress');
function func() {

var PickUpAddress = ctrlApt#.getValue()+' '+ctrlState/Province:.getValue()+' '+ctrlAddress:.getValue()+' '+ctrlCity:.getValue()+' '+ctrlZip:.getValue();

ctrlPickUpAddress.setValue(PickUpAddress);

};
ctrlApt#.on('change', func);

ctrlState/Province:.on('change', func);

ctrlAddress:.on('change', func);

ctrlCity:.on('change', func);

ctrlZip:.on('change', func);
nothing work

can u help me please

Sergey Kornilov admin 2/19/2014

I don't think that the use of characters like # : / in variable names is a good idea. Strip all of them out.
I also recommend to check this article:

http://xlinesoft.com/blog/2012/05/22/how-to-troubleshoot-javascript-errors/

It can point you in the right direction.