Advertisement
7_2009-2012 Coding Standards #227943

Preview TextArea Using DHTML.

This is a small script that will allow you to preview a textarea in an html page that may contain html code with out first processing the page to another page. May sound complicated but you will see it's not. This is for people who don't want to create a preview page just to re-write the textarea. It can now be done on the same page as the text area!.

AI

Shrnutí AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Zdrojový kód
original-source
<html>
<SCRIPT LANGUAGE=jscript>
var oPopup = window.createPopup();
function DisplayHTML(handl){
oPopup.document.body.innerHTML = window.document.all(handl).innerText;
oPopup.document.body.style.border = "solid black 1px"; 
oPopup.show(10,20, 400, 200, event.srcElement);
}
</script> 
<BODY>
The TextArea Below Support HTML Tags
<br><TEXTAREA rows=10 cols=30 name=txtNote ID=txtNote> 
<ul>
<li>Item1</li>
<br>
<li>Item 2</li>
</ul>
</TEXTAREA><span id=ttxtNote style="cursor:hand; font-weight:bold" onmouseover="DisplayHTML('txtNote')" onmouseout="oPopup.hide()" >PreView</span> 
</BODY>
</html>
Původní komentáře (3)
Obnoveno z Wayback Machine