Page 1 of 1
HTML component - how to change code?
Posted: Tue Nov 05, 2013 9:10 am
by Ram
Dear Appery,
i have an HTML component that is filled by JS append command, once the user do something i need to the change the HTML code in it to something else, i cant find the correct command to remove the current HTML code before using the append command again.. can you pls point me on how to do it?
Many thanks in advance!
Best,
R.
HTML component - how to change code?
Posted: Tue Nov 05, 2013 10:16 am
by Maryna Brodina
Hello! Working on it. I'll update.
HTML component - how to change code?
Posted: Tue Nov 05, 2013 10:24 am
by Ram
HTML component - how to change code?
Posted: Tue Nov 05, 2013 1:10 pm
by Maryna Brodina
If you need to change html inside html component - use jquery html method http://api.jquery.com/html/
preAppery("htmlComponentName").html("new text here");/pre
previous content will be replaced. If you need to delete it use preAppery("htmlComponentName").html("");/pre
HTML component - how to change code?
Posted: Tue Nov 05, 2013 1:14 pm
by Ram
HTML component - how to change code?
Posted: Mon Jun 09, 2014 1:25 pm
by EJLD
thks to Appery
this has help me a lot too!
HTML component - how to change code?
Posted: Sat May 23, 2015 10:28 am
by Cat
Thank you Maryna!
This piece of code saved me so much trouble. Was able to assign the text of a button (inside html component) from "appery" JS (outside html component) with:
$( "button.buttonclass" ).html("test");
very cool!