Most modern browsers allow you to do some combination of mouse clicks to open a link in either the current window, a new window, or a new tab. When you set up a page for yourself, you have a fourth option to send links to a frame in the current window. However, links that force a _new or _blank target prevent you from opening in the current window or in a same-page frame. In our beloved fullpage chat, the feeds for privatemessages, showotherusers, and showchatmessages all hard code a base target of "_new". The feed for just_search OTOH allows you to specify the base target with a formtarget parameter.

Why do I care? Well, I'm modifying tye's version of fullpage chat to work like my old Zedulator. You can grab the new Zedulator here. I have the search form go to a frame under the chat frame so I can do searches onsite or using google:// etc. and see the result pages in the same window/tab as the chat. I also have small but expandable frames for private messages and other users. What I'd like to do is be able to have the chat, private messages, and other user links open in the same bottom frame that the search results do. That way I can visit a link someone suggests in the cb without leaving the cb.

What would it take to fix this (if you agree it needs fixing)?

  1. The easiest would be to hardcode a window/frame name like "pm_display". If the base target were that instead of "_new", then users of fullpage chat would get the same behaviour as now - it would open in a new tab/window depending on mouse click; while users of Zedulator and other fullpage chat derivatives could create a frame called "pm_display" and the links would then redirect there.
  2. A more complete but more labor intensive approach would be to make privatemessages, showotherusers, and showchatmessages behave the way just_search does and accept a target parameter.

So, which do you prefer: 1) hardcode a specific frame/window name or 2) add parameters to the existing feeds or 3) nah, leave it like it is.

I'm pretty sure I could implement #1 myself and could probably do #2 with some hints.


In reply to _new considered harmful by jZed

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.