Jump to content

html help


ahalmen

Recommended Posts

I have a checkbox in html that when checked enables an editor. I want to save the text written in this editor to the db, but il only adds null. Can't figure why. Here's the code

<form name="html_t"><br />&nbsp;HTML Template
&nbsp;<input type="checkbox" name="html" id="html" onchange="show_hide(html);" />
</form>
<div id="div_editor" style="display:none;">
<form name="editor">
    <textarea name="html_content" id="html_content" cols="50" rows="10"></textarea>
        </form>
</div>

and here is the js

function show_hide(chck){
  if(chck.checked==1){
    document.getElementById('div_editor').style.display = "";
  }
  else{
    document.getElementById('div_editor').style.display = "none";
  }
}
Link to comment
https://forums.phpfreaks.com/topic/22223-html-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.