I want to set my textboxes empty(blank) once user posted or skipped feed box in facebook. i m using following code:
var attachment = {
.........some code here............
};
Facebook.streamPublish('', attachment,actionLinks,null,null,clear);
}
function clear()
{
document.getElementById("question").setTextValue() = "";
}
but this is not working. please help me.....
You can use the onfocus attribute in JavaScript to clear a textbox or an input box when somebody sets focus on the field. If you are using jQuery, then use the . focus() method to clear the field.
To make values empty you can do the following: $("#element"). val('');
when you do not enter anything in INPUT box then its value become UNDEFINED.
Assuming the element you want to change has the id question
, so you can do
document.getElementById("question").value = "";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With