This topic is locked
[SOLVED]

 clear advance search fields

4/14/2015 7:18:26 AM
PHPRunner General questions
S
Sidewinder author

how do you clear the old search data out off the search page on load. so users do not have to hit the reset button
my fields are customer name and city. there are several othersfields but these are the main 2.
ive tried adding the lines below into search before display but it doesn't clear the fields

$xt->assign("customer name","");

$xt->assign("city","");
im sure this has been asked before, ive searched the forums but have not found anything that works
can anyone help me
thanks

Sergey Kornilov admin 4/15/2015

Use Javascript API for this purpose. In Javascript OnLoad event add something like this:

var ctrl1 = Runner.getControl(pageid, 'customer name');

ctrl1.setValue("");

var ctrl2 = Runner.getControl(pageid, 'city');

ctrl2.setValue("");
S
Sidewinder author 4/16/2015

Thanks Sergey, Works Great!!!!
Thanks