You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Rovi <ro...@yahoo.com> on 2005/12/24 05:56:03 UTC

Open links in external browser window (_blank)

How to I place a link that opens external to the current window? Normally I 
would use target=_blank, but in Kupu I don't see any option to specify this 
option. Also, when I try using BXE to specify the link in Firefox, I get a 
message "a is not allowed as a child of a". If I try using source editor to 
change target of the link, when i save, I get "RELAX NG Validation failed:" 
error in red, with a bunch of other errors like:
error: text not allowed here ....filename.xml:22:46:
error: element "br" from namespace "http://www.w3.org/1999/xhtml" not allowed 
in this context
error: element "a" from namespace "http://www.w3.org/1999/xhtml" not allowed 
in this context
etc., etc.
I had copy pasted the text from an HTML page to a text editor, and then pasted 
it in Kupu.
I guess I am missing a big piece here - am I not supposed to copy paste text 
into Kupu??
Any help will be appreciated. Thanks!



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Open links in external browser window (_blank)

Posted by Rovi <ro...@yahoo.com>.
Martin Heiden <martin.heiden <at> devk.de> writes:
 Rovi,

   just a guess: target is deprecated and not part of XHTML 1.0 strict.
 
   You could try to switch to XHTML 1.0 transitional DTD or open the
   window by javascript. A handy way is to use the rel attribute for
   marking links that should open in a new window. Put the url into
   href and a marker into rel like rel="external". The javascript
   itself registers for the window.onload event, scans the page for all
   a-Tags and applies a function for opening the window for all marked
   links, which reads the url from the href attribute. Don't forget to
   return !window.open so that the link will open in the same window if
   javascript is disabled.
 
   Take a look at:
 
   http://www.onlinetools.org/articles/unobtrusivejavascript/
 
 regards,
 
   Martin



Thanks Martin! How can I switch to XHTML 1.0 transitional DTD? I would infact 
like to switch to DTD which has the least restrictions. 




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Open links in external browser window (_blank)

Posted by Martin Heiden <ma...@devk.de>.
Rovi,

  just a guess: target is deprecated and not part of XHTML 1.0 strict.

  You could try to switch to XHTML 1.0 transitional DTD or open the
  window by javascript. A handy way is to use the rel attribute for
  marking links that should open in a new window. Put the url into
  href and a marker into rel like rel="external". The javascript
  itself registers for the window.onload event, scans the page for all
  a-Tags and applies a function for opening the window for all marked
  links, which reads the url from the href attribute. Don't forget to
  return !window.open so that the link will open in the same window if
  javascript is disabled.

  Take a look at:

  http://www.onlinetools.org/articles/unobtrusivejavascript/

regards,

  Martin

am Samstag, 24. Dezember 2005 um 05:56 schrieben Sie:

> How to I place a link that opens external to the current window? Normally I
> would use target=_blank, but in Kupu I don't see any option to specify this
> option. Also, when I try using BXE to specify the link in Firefox, I get a
> message "a is not allowed as a child of a". If I try using source editor to
> change target of the link, when i save, I get "RELAX NG Validation failed:"
> error in red, with a bunch of other errors like:
> error: text not allowed here ....filename.xml:22:46:
> error: element "br" from namespace "http://www.w3.org/1999/xhtml" not allowed
> in this context
> error: element "a" from namespace "http://www.w3.org/1999/xhtml" not allowed
> in this context
> etc., etc.
> I had copy pasted the text from an HTML page to a text editor, and then pasted
> it in Kupu.
> I guess I am missing a big piece here - am I not supposed to copy paste text
> into Kupu??
> Any help will be appreciated. Thanks!





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Open links in external browser window (_blank)

Posted by so...@apache.org.
On 12/28/05, Angelo Turetta <at...@bestunion.it> wrote:
> solprovider@apache.org wrote:
> > <a target="_blank"> is valid for strict:
> > http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Strict
>
> Actually, the page you linked contains also the Transitional dtd, and
> the first occurrence on 'target' is exactly between the entities section
> of the transitional.
> Angelo.

Oops.  You are correct.  Sorry.  I had not noticed there were multiple
DTDs on the page since the I used a named anchor to open the page at
the start of the Strict DTD.

I think DTDs were deliberately created to be difficult to understand. 
And the W3C putting several DTDs on one page so searching the text
returns a term from a different DTD is cruel.

Still... Rovi needs quotes.  And has there been a change between 1.2.2
and 1.2.4 that would error based on Strict?  It worked fine in 1.2.2.

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Open links in external browser window (_blank)

Posted by Angelo Turetta <at...@bestunion.it>.
solprovider@apache.org wrote:

> Martin:
> <a target="_blank"> is valid for strict:
> http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Strict

Actually, the page you linked contains also the Transitional dtd, and 
the first occurrence on 'target' is exactly between the entities section 
of the transitional.

Angelo.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Open links in external browser window (_blank)

Posted by so...@apache.org.
On 12/23/05, Rovi <ro...@yahoo.com> wrote:
> How to I place a link that opens external to the current window? Normally I
> would use target=_blank, but in Kupu I don't see any option to specify this
> option. Also, when I try using BXE to specify the link in Firefox, I get a
> message "a is not allowed as a child of a". If I try using source editor to
> change target of the link, when i save, I get "RELAX NG Validation failed:"
> error in red, with a bunch of other errors like:
> error: text not allowed here ....filename.xml:22:46:
> error: element "br" from namespace "http://www.w3.org/1999/xhtml" not allowed
> in this context
> error: element "a" from namespace "http://www.w3.org/1999/xhtml" not allowed
> in this context
> etc., etc.
> I had copy pasted the text from an HTML page to a text editor, and then pasted
> it in Kupu.
> I guess I am missing a big piece here - am I not supposed to copy paste text
> into Kupu??

Martin:
<a target="_blank"> is valid for strict:
http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Strict

Rovi:
<a target=_blank> is not valid because it is missing quotes.  See the
example above.

I tested with Lenya1.2.2.  Create a link normally in Kupu.  Switch to
source (last icon).  Added target="_blank" to the A tag.  Exit Source.
 Save.  Exit.  Test link.  Worked fine.

And yes, the editors need to be revamped for usability.  Too much
simple stuff requires editing source code.

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org