javascript - pull addContentHTML content from XML or HTML file -


i have created js dialog window, shows html (below). problem is, instead of hard-coding shown content html string, want keep text content in separate xml or html, pulled dialog addcontenthtml. how done?

best regards

createdialog: function () {     this.dialog = new dialog({         title: 'version info',          id:'version_window',          resizable: true,         width: 420     });     this.dialog.addcontenthtml('<b>latest public version: </b>1.0</br></br><b>currently testing:</b> 1.01</br></br>'); } 

you can pull content hidden element in dom:

<div id="content" style="display: none">     ... </div>  this.dialog.addcontenthtml(document.getelementbyid('content').innerhtml); 

there more on way this, gist of it.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -