留言板

Dynamically add aui:input tags

Jimit Shah,修改在9 年前。

Dynamically add aui:input tags

Junior Member 帖子: 62 加入日期: 14-2-5 最近的帖子
Hi all,
I want to add an aui-input tag dynamically on the click of a button. I know I can't do it in a javascript since it is a jsp tag. However i need to know if there is any workaround for the same.
My requirement is that there is a button, say "ADD", on the click of which "<aui:input name='abc' type='text'>" should be added without the page getting refreshed as the content of the other fields should not vanish.
Please let me know as to how this could be done.

Regards.
thumbnail
Manali Lalaji,修改在9 年前。

RE: Dynamically add aui:input tags

Expert 帖子: 362 加入日期: 10-3-9 最近的帖子
Hi,

Cant you try having input on page and handle via css - dislay:none/block ? Or having hidden input and setting its value dynamically on click of button?

HTH!
thumbnail
Pankaj Kathiriya,修改在9 年前。

RE: Dynamically add aui:input tags

Liferay Master 帖子: 722 加入日期: 10-8-5 最近的帖子
Try A.createNode
function.