How do i pass var rating and var itervalue into my window.location.replace? i get new rating variable from function updateRating() and when i click hireraccept, it assigns a new itervalue variable which i wish to pass them both into the "proceed" button into the window.location.replace url. any idea?
<script type="text/javascript">
$(document).ready(function(){
var rating = 0;
var itervalue = 0;
$(".hireraccept").click(function(){
$('.jRating').jRating();
$("#dialog-rate").dialog("open");
var itervalue = $(this).attr("value");
return false
});
$("#dialog-rate").dialog({
autoOpen: false,
resizable: false,
height: 200,
width: 200,
modal: true,
buttons: {
"Proceed": function(){
window.location.replace("{{ domain_url }}/workroom/accept/" + itervalue +"/" + rating);
$(this).dialog("close");
}
}
});
});
</script>
<script type="text/javascript">
function updateRating(rate,proceed){
goodtogo = proceed;
rating = rate;
}
</script>