Page 1 of 1

set value of input to 'null'

Posted: Mon May 26, 2014 5:07 am
by Dave Troxel

I want to use button 'on click' event to set property of input field to 'null'. Basically clear whatever it currently in the input, making it empty again.


set value of input to 'null'

Posted: Mon May 26, 2014 5:30 am
by Kateryna Grynko

Hi Dave,

Did you check this section?
http://devcenter.appery.io/documentat...


set value of input to 'null'

Posted: Mon May 26, 2014 5:35 am
by Dave Troxel

I don't know what model and storage has to do with my question. And if the answer is buried in there, I wouldn't know it if jumped up and bit me. Can you please draft up an illustration of what I can do to make this happen? Something us simple folks can understand? Please?

I tried setting button click to this:

function Clear()
{
document.getElementById("RxName_forminput").value= "";
document.getElementById("RxDose_forminput").value= "";
document.getElementById("RxFreqNum_selectmenu").value= "#";
document.getElementById("RxFreqPer_selectmenu").value= "how often";
document.getElementById("RxNotes_forminput").value= "";
document.getElementById("RxNum_forminput").value= "";
document.getElementById("RxPharmacy_forminput").value= "";
document.getElementById("RxPhone_forminput").value= "";
document.getElementById("RxStoreNum_forminput").value= "";
}

Didn't work. SOmeone please help me.


set value of input to 'null'

Posted: Mon May 26, 2014 6:06 am
by Kateryna Grynko

Dave,

Use this code to clear Input fields:pre$("input").val("");/pre


set value of input to 'null'

Posted: Mon May 26, 2014 3:32 pm
by Dave Troxel

Not sure how this is supposed to work. How and where do I put the code?
These do not work:
Image

Image


set value of input to 'null'

Posted: Mon May 26, 2014 5:24 pm
by Evgene Karachevtsev

Dave,

You should run JavaScript on some event:

code$("[name=input_name]").val(""); /code

оr

codeAppery("input_name").val("");/code

where "input_name" is the name of input component


set value of input to 'null'

Posted: Mon May 26, 2014 5:43 pm
by Dave Troxel

Thank you Evgene.