Re: little extension of BLink
Thorsten Möller <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <01ca01c39e6c$6d6ef270$2a2e4c8d@Thoro> |
Jacob Kjome <[email protected]> wrote: > However, these values are not > defined by the HTML4.01 spec that I can find. I would disagree, see: http://www.w3.org/TR/html401/present/frames.html#adef-target quote: "The target attribute may be set for elements that create links (A, LINK), image maps (AREA), and forms (FORM)." > supported by the various browsers, but are not a standard. In most > cases, this use of the target attribute should be replaced with > scripting anyway, especially in the case of "_blank" such as... > > <a href="foo.html" onclick="window.open(this.href);return > false;">Foo</a> Will not work when JavaScript is diabled, but target="_blank" always works (as JavaScript is still a security risk, it is legitim that users want to deacticate it). > Also note that the case for having get/setTarget() in BLink is a > questionable one. Why? Since the methods exist why shouln't use them? > Take note of the examples described (in the > Javadoc) for BLink's use; <a>, <input>, and <button>. In my opinion the problem is that BLink mixes up to much. Sorry if I say this, but the design is not the best. BLink should only be the counterpart of <a> (and maybe <area>) element, whereas BAction should be the counterpart of <input>, <form> and so on. As a consequence BLink should not extend BAction. But I don't want to start a new discussion. I can live with the status quo. > than having a BComponent for every tag, but it does require diligence > on the developer's part to keep from generating illegal markup. It would be much better if the components functional specification wouln't allow this, for example setTarget() on <input>. Regards, Thorsten