how to send element values from parent window to child layer window element?
i have an array of comments from DB and each comment have a reply links. when i click on the anchor reply i need to open a new layer window.. and i need that particular commen开发者_Python百科t id in the newly popup layer window.
Whether you are doing this with a popup window or an iframe you can pass the information you need in the url of the reply anchor...
If you need to access it on the server then send in the url as a query string (php for example). layer.php?comment_id=123
If you need to access it in javascript then use a hash to pass it: layer.html#comment_id=123
You could then use javascript to get the hash
var id = document.location.hash.match(/comment_id=([1-9][0-9]*)/)[1];
精彩评论