I currently have a javascript popup div that contains a select object that is populated from a POST variable that was generated from the main page. Is it efficient to pass data with html via post to pass data to a popup? Or is there a better way to do this?
main page
< ?php
require('testclass.php);
$obj = new testclass();
foreach ($obj->getlist as $listobj)
{
$output .= "<option>" . $listobj['name'] . "</option>";
?>
main page javascript
<script type=text/javascript">
$(document).ready(function () {
$("#a_popup").click(function () {
$("#div_popup").load("popup.php", {"list" : "<?php echo $output ?>"});
});
});
popup.php
<select> <?php echo $_POST['list'] ?> </select>