I have tried this code but its not working....what I want is that when I click on "Available" hyperlink a popup form should be opened. I have copied the code below

<? 
        if($GotPro['available']==1)
        {

        echo ($GotPro['PropertyName'].":". '<a href="#" ><script type="text/javascript">window.open(<a href="checkavailability.php" ></a>)</script>Available</a>'); 

        }
        else if($GotPro['available']==0)
        {
        echo ($GotPro['PropertyName'].":". '<a href="#" ><script type="text/javascript">window.open(<a href="checkavailability.php"></a>)</script>UnAvailable</a>'); 
        }
       ?>

Ideally it should work like if user clicks on "Available" hyperlink "checkavailability.php" should open in popup. But it is giving error now

Please someone must help....thanks in advance

Member Avatar
diafol

Have a look at jQuery dialogs or even lightboxes that accept html data. These produce a way to create popups without opening a new browser tab or window - something that could be blocked by the user's browser.

Lightboxes are a fine solution to overlay the form on the existing page. You can use either a button or a text link to open the form.