Page 1 of 1

Save content of HTML object into db and reload it in the HTML object

Posted: Sun Jan 01, 2023 10:55 am
by yvesf
Hello,

I am using HTML object which is updated with values like href links. I would like to save the content of this html object on save and reload it next time. I have created another textarea object which content the same content as html has. The content of the html is now saved in the database.
When I reload it, I would like to reload the content of the html control has it was before. Any idea about how to do that ?
Many thanks,

Yves

Re: Save content of HTML object into db and reload it in the HTML object

Posted: Sun Jan 01, 2023 11:24 am
by kev1n
Like this?

Code: Select all

nuSetValue('htmlobjectid', textareaid.value, 'html');

Re: Save content of HTML object into db and reload it in the HTML object

Posted: Sun Jan 01, 2023 12:09 pm
by yvesf
I have put your code behind onnuload() and it works. I have tried with

Code: Select all

nuSetValue('htmlobjectid', nuGetValue('textareaid'), 'html');
and it doesn't work. Why this syntax doesn't work as opposed to yours ?
Many thanks Kev1n again. I was lost.

Re: Save content of HTML object into db and reload it in the HTML object

Posted: Sun Jan 01, 2023 12:13 pm
by kev1n
nuGetValue('textareaid') and textareaid.value returns the same for input objects.

Any errors in the developer console?