May I know if there is a way to hidden the URL
or the full details on the URL
. For example, I have a link that will show a details for a file report. For that link, I am using GET
. Example as below,
$(document).ready(function(){
$("#pr_id").change(function(){
var pr_no = $('#pr_id').val();
$.post('orderform.php',
{
pr_no : pr_no
})
.done(function(data){
$('#result').html('<a href="../view-detail-purchase-pdf.php?pr_no='+ pr_no +'" class="popupwindow"');
$(".popupwindow").popupwindow(profiles);
});
});
});
Can I hide the pr_no
on the link if using the GET
method or if there is another option to do this. Can also provide me with a link or resource. Just for an info, I'm using a popupwindow plugin
that will open the link in new window.
Update Code with POST
I'm not sure whether I am doing it correctly. It does POST
the value to the selected page as seen on the Network Header
but it does not open the new page as requested. Below are the update of my codes;
<script>
$(document).ready(function(){
$("#pr_id").change(function(){
var pr_no = $('#pr_id').val();
$.post('orderform.php',
{
pr_no : pr_no
})
.done(function(data){
$('#result').html('<a href="../view-detail-purchase-pdf.php?" class="popupwindow" id="newLink">' + pr_no + '</a>');
$('#newLink').click(function(event){
event.preventDefault();
var page = $(this).attr('href');
$.post(page,
{
pr_no : pr_no
})
.done(function(data){
var myWindow = window.open(page, "MsgWindow", "width=800,height=800");
});
});
});
});
});
</script>