Okay. Thanks for checking for me Dan, i'm sorry to have wasted your time.
I found that I had missed the target attribute on one of the if branches.
Context wise, i'm using a regular expression to wrap matching (link) text in
anchor tags.
It also matches email addresses with a second regular expression and will
insert the http:// on the start if it thinks it's missing.
So there's 3 places I should have put the target.
That said, you're right about the standards-friendlyness. I will switch to
using a click handler.
Gareth
On 11/6/07, Dan Dorman <[EMAIL PROTECTED]> wrote:
>
>
> On 11/5/07, Gareth Evans <[EMAIL PROTECTED]> wrote:
> > Okay, that's one option, but depsite the attribute being deprecated,
> > shouldn't it still work?
>
> Yeah, it should. I just whipped up a test and target="_blank" worked
> as advertised. (Browsers tested included Firefox, Opera, Safari, and
> IE 6.) What browser are you using?
>
> Also, I realize your example is devoid of context, but I noticed the
> link doesn't have any associated text (e.g., new Element('a', { href:
> '#', target: '_blank' }).insert('click me!')). If that's also the case
> in the actual code, that could be your problem.
>
> Although, as long as you're using JS to add "open in new window"
> functionality anyway, it's more standards-friendly to add an event
> handler as previously described.
>
> :Dan Dorman
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---