Trying to get a url to open a new window in Simile Timeline

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • doublestack
    New Member
    • Jul 2008
    • 21

    Trying to get a url to open a new window in Simile Timeline

    Hi everyone,
    I have a xml file that Simile Timeline uses to call events...Some of the events have links in them and I need to have those links open a new window. As it stands now the links replace the timeline. Simile Timeline uses DHTML and AJAX. Any suggestions?

    Sample of code:

    [CODE=xml]<data>
    <event start="Jun 02 2008 09:00:00 GMT" end="Aug 02 2008 16:00:00 GMT" isDuration="tru e" title="Internsh ip at LMC" image="http://i134.photobucke t.com/albums/q82/djdoublestack/efa4ad6a.jpg">D ocumentation and links for new hires at &lt;a href ="https://passport.global .lmco.com/irj/portal/"&gt;Passport&l t;/a&gt;. </event>
    <event start="Jul 01 2008 11:00:00 GMT" end="Aug 02 2008 13:00:00 GMT" isDuration="tru e" title="BSA Site Redesign" image="https://sharepoint.glob al.lmco.com/sites/BSAGroup/Logo%20Options/Typo-%20Magnifying%2 0spelled%20wron g/bsa_logo_v1.GIF ">Project updates and site improvements at &lt;a href="https://sharepoint.glob al.lmco.com/sites/BSAGroup/default.aspx"&g t;Team Site&lt;/a&gt;.</event>
    <event start="July 02 2008 13:00:00 GMT-0500" title= "Implement changes to Sharepoint site to include Timeline" />
    <event start="Aug 05 2008 05:00:00 GMT-0500" title= "Board plane to Bethesda MD" link="http://www.expedia.com/daily/flights/default.asp?rfr r=-409/">HQ here we come!</event>
    <event start="Aug 05 2008 10:00:00 GMT-0500" title= "Meet with Sondra to discuss BSA changes" />
    <event start="Sep 10 2008 12:00:00 GMT-0500" title= "Changes to eVCS servers" />
    <event start="Sep 10 2008 14:00:00 GMT-0500" title= "Meet with BSA Leads to discuss new projects" />


    </data>[/CODE]
    Last edited by acoder; Jul 4 '08, 09:00 AM. Reason: Added [code] tags
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    To open a window, use window.open(). If you can use links, use something like:
    [code=html]<a href="linktopag e.html" onclick="window .open(this.href , 'windowName',.. .)">...</a>[/code]If you can declare functions, then you could call a function onclick instead.

    Comment

    • doublestack
      New Member
      • Jul 2008
      • 21

      #3
      Hi,

      I tried to insert that into the XML file but it comes back with "object error". Can you give a specific example of how to use the code with the code I provided, like line 2 or 5? Thanks

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        You mention that Simile Timeline uses DHTML and Ajax. Perhaps rather than modifying the XML, you can use JavaScript to turn the links into window.open() calls.

        Comment

        • doublestack
          New Member
          • Jul 2008
          • 21

          #5
          I just figured it out, and it's amazing how easy it was...here is what I added:"target=_ new"
          Code:
           <event start="Jun 02 2008 09:00:00 GMT" end="Aug 02 2008 16:00:00 GMT" isDuration="true" title="Internship at LMC" image="http://i134.photobucket.com/albums/q82/djdoublestack/efa4ad6a.jpg">Documentation and links for new hires at &lt;a target=_new href="https://passport.global.lmco.com/irj/portal/"&gt;Passport&lt;/a&gt;. </event>
          It worked for that case but won't work for this one where "Board plane..." needs to be the link to open a new window:
          Code:
            <event start="Aug 05 2008 05:00:00 GMT-0500" title= "Board plane to Bethesda MD" link="http://www.expedia.com/daily/flights/default.asp?rfrr=-409/">HQ here we come!</event>

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            For links, target='_blank' would also work.

            I think your best bet would be to add code which converts links to open new windows, rather than looking for something to add in the XML.

            Comment

            Working...