php - button to dynamically load $body data into <textarea> -


    <form id="form1" name="form1" method="post">     <textarea name="list" id="emails" rows="10" value="send to" ondblclick="select_all('emails');" onfocus="if (this.value == 'send to' || this.value == 'send to: separate emails comma , space') {this.value = '';}" onblur="if (this.value == '') {this.value = 'send to: separate emails comma , space';}" cols="40">send to</textarea><br/>     <input name="subject" id="subject" value="subject" onfocus="if (this.value == 'subject') {this.value = '';}" onblur="if (this.value == '') {this.value = 'your jagex account';}" size="17"/>     <select name="template" id="template" onchange="load();">         <option value="none">don't use template</option>         <option value="rwt">report abuse</option>         <option value="renew">resend email codes</option>     </select>     <button name="load" type="submit" id="bt3" onclick="load();" style="width: 50px;"><span>load</span></button><br/>     <textarea name="body" rows="10" id="content" ondblclick="select_all('content');" cols="40"><?php echo htmlspecialchars($body)?></textarea><br/>     <button name="submit" type="submit" id="bt1" onclick="disable();" style="width: 345px;"><span>send</span></button>     <button name="submit" type="submit" id="bt2" style="visibility:hidden;width: 345px;"><span>sending...</span>     </button> </form>   <script type="text/javascript"> function load() {      document.form1.submit();  } </script> 

when click load doesn't load option data textarea.

else if ($template == "rwt") {         $body = "dear player,<br/><br/>";         $body .= "we regret inform account has received infraction due major offense. please visit appeal section under account management view evidence of infraction(s) , appeal infraction(s) feel unjustified.<br/><br/>"; 

how data post inside textarea?

php

 // have written before else         $template=$_post['template'];      else if ($template == "rwt") { 

javascript

 function load()    {     document.forms["your_form"].submit();    } 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -