I am using jQuery and AJAX. When clicking the Hyperlink, the associated document to be loaded in Popup Menu works fine. The problem comes when I use AJAX.
My Code:
//index.html
....
jQuery.ajax({
type:'POST',
url:' my.php',
data:'one='+one,
success: function(data){
jQuery("#another").load("load.html");
//pop up code for the Load.html
jQuery("a[rel='pop']").click(function (e) {
e.preventDefault();
var features = "height=700,width=800,scrollTo,resizable=1,scrollbars=1,location=0";
newwindow=window.open(this.href, 'Popup', features);
return false;
});
}//success
}); //ajax
Strategy: After Seeing the Hyperlink , The associated content will need to be displayed in popup.
//Load.html
<a href="pdf/file1.pdf" id="pop" rel="pop"> click 1.</a>
<a href="pdf/file2.pdf" rel="pop">click2</a>
Since Load.html, dynamically loads in index.html, all tag associated with pdfs link the load.html will not display the document in popup. I need help to change my code to do the above output.