0

First take a look at this fiddle http://jsfiddle.net/YrSzQ/

Basically what I am trying to do is add a code like this

<a target="_blank" href="here should be the event tile that you see at the first line of the fiddleel .html">open event</a>

That when I click the open event I should open the whole div in new page.

It may seem that I am answering the question, but I have no access to that code in the fiddle that code is retrieved from remote page by file get contents, and I want to add this before echo the code in my page

I hope you understand what I am trying to explain

Mostafa Biomy
  • 13
  • 1
  • 7
  • possible duplicate of [Add content to a new open window](http://stackoverflow.com/questions/10472927/add-content-to-a-new-open-window) – Mooseman May 30 '13 at 15:34

2 Answers2

0

Don't know if I understood you right, but if you want to open a new window with the content of a given div, why don't you just use window.open and add the content of the existing div to the opened window, as described here: Add content to a new open window

Community
  • 1
  • 1
Toni
  • 1,593
  • 1
  • 11
  • 21
  • no no what i mean, lets explain it in other words i have page that contain many divs all like that in the fiddle i want to ad link i every div when sone click that link it open window containing this div only div in new window – Mostafa Biomy May 30 '13 at 15:43
0

Perhaps you are looking for something like this? Use jQuery to identify when a link inside YOUR div is clicked and then perform a javascript action to open that div in its own window.

jsFiddle here

<html>
    <head>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
//alert('Document is ready');
                $('#newwindow a').click(function() {
                    alert('helloooooo');
                });

            });
        </script>
    </head>
<body>

<div id="newwindow">
    <span class="lshevent">Li - Mattek-Sands (Court 1)</span>       
    <div id="event153341" class="lshjpane-slider lshcontent" style="padding-top: 0px; border-top-width: medium; border-top-style: none; padding-bottom: 0px; border-bottom-width: medium; border-bottom-style: none; overflow: hidden; height: 308px;">
        <table width="100%" class="insideslidebg" cellpadding="0" cellspacing="0" border="0"><tbody><tr><td colspan="2"><b>Live Streaming Video </b> <span class="section">Tennis</span>
            <b>: </b> <span id="category754" class="category">Roland Garros 2013</span>
        </td>
    </tr></tbody></table></td>


{ SNIP! }


    </tr></tbody></table></div><!-- #event153341 -->

</div><!--#newwindow-->


</body>
</html>
cssyphus
  • 37,875
  • 18
  • 96
  • 111