Change the code from
function openDialog(myVariable){
$('div#dialogbox').dialog({
buttons:{
'OK': function(){
window.location.href="otherfile.jsp?id= '; //I want myVariable value after "id="
}}});
}
To
function openDialog(myVariable){
$('div#dialogbox').dialog({
buttons:{
'OK': function(){
window.location.href="otherfile.jsp?id="+myVariable;
}}});
}
Hope the above changes help.