vendredi 25 avril 2014

jQuery Load Div Content from Current Page to Another Page


Vote count:

0




I have seen some example of loading HTML content to page from an outside of the current page like



$( "#divData" ).load( "article.html #target" );


Now I need to do some thing completely visa versa! I mean I need to export a portion of my current active page to an existing .php page on the server. For example if I have an HTML like



<!DOCTYPE HTML>
<html>
<body>
<div class="well">
<div class="btn-group">
<button class="btn">Left</button>
<button class="btn">Middle</button>
<button class="btn">Right</button>
</div>
<button id="loader" class="btn btn-default">Load To PHP Page</button>
</div>
</body>
</html>


how can I export/Load the well content with it's entire elements to a .PHP lets say print.php page which is like this:



<?php
require_once("dompdf_config.inc.php");
$codigo= '<html>
<body>
</body>
</html>';
$codigo = utf8_decode($codigo);
$dompdf = new DOMPDF();
$dompdf->load_html($codigo);
ini_set("memory_limit","32M");
$dompdf->render();
$dompdf->stream("ejemplo.pdf");


Thanks



asked 33 secs ago






Aucun commentaire:

Enregistrer un commentaire