I’ve been having trouble implementing the problem I’ve had here for a few days now so I’m trying to come up with an alternative of achieving the same thing. I decided to not use an external file for the form and instead have it internally in my html file. The problem I am encountering now is the dialog only shows up Package 1 and not on Package 2.
The Code:
<script type="text/javascript">
$('#PackageBook').dialog({
autoOpen: false,
width: 500,
height: 400
});
$('#PackageBookOpen').click(function(){
$('#PackageBook').dialog('open');
return false;
});
</script>
<body>
<div id="Package1" class="packageDialog">
<div id="order">
<a id="PackageBookOpen" title="Package Booking" class="ui-state-default ui-corner-all" href="#"><img src="images/order.png"></a>
</div>
</div>
<div id="Package2" class="packageDialog">
<div id="order">
<a id="PackageBookOpen" title="Package Booking" class="ui-state-default ui-corner-all" href="#"><img src="images/order.png"></a>
</div>
</div>
<div id="PackageBook" class="packageBookDialog" title="Package Booking">
<form name="package" action="">
//Form
</form>
</div>
</body>
You cannot have multiple of the same Id’s. Use a class selector instead e.g.
and add the class packageBookOpen to the appropriate elements.