Ram
Posts: 0
Joined: Fri Aug 02, 2013 12:15 pm

HTML component - how to change code?

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.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

HTML component - how to change code?

Hello! Working on it. I'll update.

Ram
Posts: 0
Joined: Fri Aug 02, 2013 12:15 pm

HTML component - how to change code?

thx much!

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

HTML component - how to change code?

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

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

HTML component - how to change code?

thks to Appery
this has help me a lot too!

Cat
Posts: 0
Joined: Wed Sep 25, 2013 11:01 am

HTML component - how to change code?

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!

Return to “Issues”