$(".btn").click(function(){
$('<div></div>').appendTo('body')
.html('<div> Select </div>')
.dialog({
modal: true, title: 'Select', zIndex: 10000,autoOpen:true,
width: 'auto',
resizable: false,
draggable: false,
modal: true,
hide: { effect: "clip", duration: 1000 },
buttons: {
A: function () {
window.location.href="xyz.php?param=A";
},
B: function () {
window.location.href="xyz.php?param=B";
}
},
close: function (event, ui) {
}
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"> </script>
<div class="btn">Click</div>
I am trying to redirect when there is a button clicked. Current Implementation redirects to myHomePage/0 or myHomePage/1
. None of my params are set and redirecting php also not working.
What is wrong in this? Please let me know.