Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Søren Klemensen 16 posts 36 karma points
    Aug 16, 2011 @ 20:38
    Søren Klemensen
    0

    Popups made simple

    I have made a popup on my site, and my quiestion is can i make i more simple instead of copying the entire text.

    Heres the code:

    <!--POPUP START-->
    <div id="popup1" class="popup_block">

    <a class="close" href="#">
    <img class="btn_close" alt="Close" title="Close Window" src="/gfx/close_pop.png">
    </a>
    <a>
    <img style="float: right; margin: 50px 0 0 20px;" alt="Dennis" src="/gfx/unknown.jpg">
    </a>
    <h2>Dennis Ramussen</h2>
    <pre>Striker</pre>
    <p>
    Kynisk afslutter med god speed, der har et bredt repertoire af afslutninger og dermed er en keepers mareridt. Afslutningen falder oftes med venstrebenet, men højrebenet kan bestemt bruges.
    </p>

    </div>

     

    each time i the change div id with a new number, and i have placed this in my master. Therefor i ask if there is any more easy way to make this.

     

    feel free to ask any question if it would help with my problem.

    - Soren

  • Nigel Wilson 944 posts 2076 karma points
    Aug 22, 2011 @ 22:01
    Nigel Wilson
    0

    Are you outputting the above html within code or is it static ? If within a code page then you could look to add the node id to the id of the div thereby making it unique

    For XSLT you could do something like this

    <div>
    <xsl:attribute name="id">
    <xsl:value-of select="concat("popup",$currentPage/@id)"/>
    </xsl:attribute>
    ....

    If the above is not useful then please explain the context in which you are adding the popup to your page and this will help provide a more specific answer.

    Cheers

    Nigel

  • Greg Mattison 40 posts 60 karma points
    May 26, 2012 @ 18:39
    Greg Mattison
    0

    Soren, where would you place that code in the master template?  Does it go in the head section?  I'm trying to implement a little popup window to give users an alert and don't know how to do this.  Any direction you can provide is helpful. 

Please Sign in or register to post replies

Write your reply to:

Draft