Monday, 15 April 2013

php - How to pass values via href to new popup window -



php - How to pass values via href to new popup window -

i want have variable want pass parent page popup window.

trying below not getting required output on popup window.

parent page:

<a href=cancellation_policy.php?d=",urlencode($vendor_id)," onclick="window.open('cancellation_policy.php','newwindow', 'width=700, height=450'); homecoming false; "><?php echo "<h10>(cancellation policy)</h10>";}?></a>

on popup window:

<?php echo $vendor_id = $_get['$d']; ?>

during javascript phone call popub, utilize cancellation_policy.php without parameters. echo $vendor_id = $_get['$d']; not echo anything. called parameter in url 'd' , not '$d'.

you either have possibility add together them javascript call:

window.open('cancellation_policy.php?d=[...]'...

or having javascript function uses href attribute of tag build finish url , utilize window.open(...). first thought faster solution.

edit: improve explanation: window.open method not utilize href attribute of a-element. there configured parameter 'd' not used here.

php popup href

No comments:

Post a Comment