Site link should have target=_top

Sean Reilly's Avatar

Sean Reilly

14 Jan, 2009 05:46 PM

I've worked around the lack of custom HTML support by putting my site's header into a frame and referring to the Tender app in a subframe. The only problem is that the go-to-site link loads my web site within a subframe, creating two headers.

It would obviously be best to get custom HTML headers and footers, but in the meantime could you mind setting the target=_top attribute for the go-to-site link?

Thanks, Sean

  1. 1 Posted by Kyle Neath (Git... on 14 Jan, 2009 09:41 PM

    Kyle Neath (GitHub Staff) 's Avatar

    Hmm, I'd really rather not do this as I don't really want to assume people are using frames. However, given the fact that you are using tender within a frame, do you even want this link inside tender? If not, I'd recommend putting this bit in your custom CSS to remove it:

    #gnav .visit_site{ display:none; }
    

    I'll be pushing on to see how long it'll take to get HTML headers and footers in safely.

  2. 2 Posted by Sean Reilly on 15 Jan, 2009 04:14 PM

    Sean Reilly's Avatar

    That is a great suggestion, but the css you sent doesn't seem to have an effect. The #gnav .visit_site {display} attribute is overridden by "#superheader ul#gnav li" according to Safari's web inspector. I'm awful with css and haven't found an easy override for that. Would you mind providing a bit of css that overrides that, if possible?

    Update: Oops, nevermind I found the right css: #superheader ul#gnav li.visit_site { display:none; }

  3. 3 Posted by Kyle Neath (Git... on 15 Jan, 2009 08:10 PM

    Kyle Neath (GitHub Staff) 's Avatar

    Cool, glad it worked out for you!

  4. Kyle Neath (GitHub Staff) closed this discussion on 15 Jan, 2009 08:10 PM.

  5. Sean Reilly re-opened this discussion on 11 Mar, 2009 04:25 PM

  6. 4 Posted by Sean Reilly on 11 Mar, 2009 04:25 PM

    Sean Reilly's Avatar

    The CSS mentioned above no longer works. Is there some new/reliable way to hide that link via CSS?

    Adding the top target would be even better. I understand not wanting to assume the site is loaded in a frame, but including target=top should work just fine whether using frames or not, and I don't see any way that this could be a security risk.

    (just signed up for the mid-range subscription)

  7. 5 Posted by Kyle Neath (Git... on 12 Mar, 2009 06:33 AM

    Kyle Neath (GitHub Staff) 's Avatar

    Sorry about that — we had to change the ul#gnav to ul.gnav, edit those lines and it should be good to go. If I include target=top, it'll actually open in a new window by default (right now it's a regular link). So while it'll work without frames, it'll make the link act differently.

  8. 6 Posted by Sean Reilly on 12 Mar, 2009 01:41 PM

    Sean Reilly's Avatar

    Thanks for your attention, but the CSS you provided still doesn't work (see http://moneydance.com/tender)

    I should also clarify that the code is target="_top" (the underscore before 'top' was sucked out by markdown before). If the link is not contained within a frame then it does no harm as '_top' is a special reference to the top-level frame (if any) of the browser window. For more information see section 6.16 of the HTML spec

    If the page is not shown in frames, the '_top' target will not open a new window/tab/frame when the link is clicked. Please consider adding it.

Discussions are closed to public comments.
If you need help with Tender please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac