Is it possible to make a text area HTML "aware"?

  • aventaclu
  • Born
  • Born
  • aventaclu
  • Posts: 3

Post 3+ Months Ago

I want to display HTML Email Templates for possible user modification but I want the embedded HTML to do it's stuff and be invisible :?:

If someone could just point me in the right direction .....
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9099
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

I am not really sure what you are talking about, but maybe you are asking about how to place hidden fields in your forms on your site? If so, you would do something like:

Code: [ Select ]
<input type="hidden" name="someField" value="someValue">


I apologize if this is not what you are seeking, maybe you could clarify a bit if you are seeking something else. Thanks.
  • aventaclu
  • Born
  • Born
  • aventaclu
  • Posts: 3

Post 3+ Months Ago

Thanks for the reply Bigwebmaster,

Well.. hypothetically and for example, if I had a <textarea1> with a value of "<h1>Hello World</h1>", could I set the value of another <textarea2> to the value of <textarea1> minus (but obeying) the tags so it would display ...

Hello World

Does that make sense (I'm confusing myself)???
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9099
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Yeah, I think I am understanding now. You should be able to do that with JavaScript, however it wouldn't be the easiest thing to program if you have no experience with JavaScript. I am not sure if there is any pre-written JavaScript out there which can do that.
  • aventaclu
  • Born
  • Born
  • aventaclu
  • Posts: 3

Post 3+ Months Ago

You're not volunteering then? :wink:

I was hoping there would be a property I could set for the Textarea (ever optomistic).

I've done a bit of scratching around, and reckon this might do me almost as well.



Code: [ Select ]
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
function displayHTML(form) {
var inf = form.htmlArea.value;
win = window.open(", ", 'popup', 'toolbar = 0, status = 1, scrollbars = 1, height = 600, width = 500');
win.document.write("<html>" + inf + "</html>");
}
</script>
</head>
<form>
<textarea name="htmlArea" cols=45 rows=6>
<hr><center><h1>HELLO WORLD</h1><h2><i><b>This is</b><i></h2><h1>PAUL</h></center><hr>
</textarea>
<br><br>
<input type="button" value=" view in browser" onclick="displayHTML(this.form)">
</form>
</html>
  1. <html>
  2. <head>
  3. <SCRIPT LANGUAGE="JavaScript">
  4. function displayHTML(form) {
  5. var inf = form.htmlArea.value;
  6. win = window.open(", ", 'popup', 'toolbar = 0, status = 1, scrollbars = 1, height = 600, width = 500');
  7. win.document.write("<html>" + inf + "</html>");
  8. }
  9. </script>
  10. </head>
  11. <form>
  12. <textarea name="htmlArea" cols=45 rows=6>
  13. <hr><center><h1>HELLO WORLD</h1><h2><i><b>This is</b><i></h2><h1>PAUL</h></center><hr>
  14. </textarea>
  15. <br><br>
  16. <input type="button" value=" view in browser" onclick="displayHTML(this.form)">
  17. </form>
  18. </html>



Thanks again BWM.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 22 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.