i need a code for, when i select a value addcurrency in dropdown list box, then one poup window should come to add currency.here i tried my jquery script but not working.
<script src="scripts/jquery.min.js"></script>
<script src="scripts/jquery.dialog.min.js"></script>
<script>
function currency_fun(ch)
{
if(ch=='add_cur')
{
//window.location.replace("addcurrency.php");
$(function(){
$("#t").onclick(function(){
$.dialog({
mask:false,
height:'auto',
title:'Add Bank Account',
html:"<form id='fm' name='fm' method='post' action='addbankacc.php'onsubmit='return(validate()); '><div class='fitem'>Your Bank: <input name='bankname' onKeyUp='disabletest()' ><span id='bn'></span></div><div class='fitem'>Account Name: <input name='acname'><span id='acname'></span></div><div class='fitem'><div class='fitem'>Account Number:<input name='acno' ><span id='acno'></span></div><div>Currency: <select name='currency'><option value='Rupee'>RUPEE</option></select></div><br><input type='submit' id='submit' value='Save' name='submit'><button type='reset' id='cancel' value='cancel' name='cancel'> Cancel</button></form>",
callback:function(){
console.log('CALLBACKS')
}
});
});
});
}
}
HTML:
<select name="select" id="select2" onchange="currency_fun(this.value)">
<?php while($row=mysqli_fetch_array($sql1)){ ?>
<option value="<?php echo $row['currency'];?>"><?php echo $row['currency'];?></option><?php }?>
<option id="t" value="add_cur">+Add Currency</option>
</select></td>