Note that there are some explanatory texts on larger screens.

plurals
  1. POparsing text with html tags using jquery
    primarykey
    data
    text
    <p>to parse an html element to be used in after click the submit , i m using this method</p> <pre><code> $panel = $('.box').html(); $("#page").append('&lt;form name="sampleForm" method="post" action="ticket.form.php"&gt;&lt;input type="hidden" name="ConfirmationPanel" value=""&gt;&lt;/form&gt;'); document.sampleForm.ConfirmationPanel.value = $panel; document.forms["sampleForm"].submit(); </code></pre> <p>and then after the submit click , i'm requesting the POST variable , and insert the content text of the POST variable to the page :</p> <pre><code> var $_POST = &lt;?php echo json_encode($_POST); ?&gt;; if($_POST["ConfirmationPanel"].length &gt; 0) { $('#tabspanel').before($_POST['ConfirmationPanel']); } </code></pre> <p>i can successfully access to the variable and also use it , and the every thing is fine , one probléme is , jquery insert the content of the POST variable like text , like this ("<code>&lt;div&gt;&lt;h1&gt;Test&lt;/h1&gt;&lt;/div&gt;</code>") , what i want is to insert it like this (<code>&lt;div&gt;&lt;h1&gt;Test&lt;/h1&gt;&lt;/div&gt;</code>) without the ( " " ) , so to be one of the page html elemnts</p> <p>otherwise : i insert the text from the POST variable befor <code>$('#tabspanel')</code> , jquery insert it as a text like this : <code>&lt;div id="tabspanel" &gt;"&lt;div&gt;&lt;h1&gt;Test&lt;/h1&gt;&lt;/div&gt;"&lt;/div&gt;</code> , i want jquery to insert it as html element until i can see the (div) and the (h1) , so to be like this : <code>&lt;div id="tabspanel" &gt;&lt;div&gt;&lt;h1&gt;Test&lt;/h1&gt;&lt;/div&gt;&lt;/div&gt;</code> –</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload