I am using an impromptu jquery plugin. I have options to insert html under the "html" option, but I need to populate an array of values that I get from php. I can’t insert it.
I want to populate the select box with the values that are in the php variable. I tried:
JSFIDDLE
var statesdemo = {
state0: {
title: 'Terms of Use',
html:'<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"><tr><td><strong>Data1</strong></td><td>:</td><td id=\'Data1\'> <select name=\'Data1\' id=\'cart_wonid\' class=\'Data1\'><?php echo $options;?> </select></td></tr></table>',
buttons: { Cancel: false, Agree: true },
focus: 1,
submit:function(e,v,m,f){
if(v){
e.preventDefault();
$.prompt.goToState('state1', true);
return false;
}
$.prompt.close();
}
},
Update 1:
1- The main idea is a drop-down list inside the popup.
2- I want to get the dropdown data from the mysql query that I wrote on the server side (php). Thus, without this popup, the @tomloprod idea suggested working fine. Now returning to the popup, I can add html content like
html : '< table > < /table > '
But I want to insert a php variable inside it, like
html : '< table > < ?php $myvariable ?> < /table >'
user4348246