Form target attribute--not validating with strict doctype?

Discussion in 'HTML' started by TheKeith, Oct 20, 2003.

  1. TheKeith

    TheKeith Guest

    I'm putting a paypal form to buy my pictures on my website and using
    paypal's automatically generated form buttons. The problem is that the form
    element itself contains a target attribute, which the validator will not
    validate. Is there another way I can target a new window with the name
    "paypal." I don't have anything up yet to link you to, but maybe someone
    here knows what I'm talking about and can help. Thanks.
     
    TheKeith, Oct 20, 2003
    #1
    1. Advertising

  2. TheKeith wrote:
    > I'm putting a paypal form to buy my pictures on my website and using
    > paypal's automatically generated form buttons. The problem is that the form
    > element itself contains a target attribute, which the validator will not
    > validate. Is there another way I can target a new window with the name
    > "paypal." I don't have anything up yet to link you to, but maybe someone
    > here knows what I'm talking about and can help. Thanks.


    Not exactly what you want, but take a look at
    http://www.sitepoint.com/article/1041.
     
    Leif K-Brooks, Oct 20, 2003
    #2
    1. Advertising

  3. Leif K-Brooks wrote:

    > Not exactly what you want, but take a look at
    > http://www.sitepoint.com/article/1041.


    If you want to open links in a new window, use a Transitional Doctype.
    Despite the claims of that article, that rewrites the document at runtime
    to make it invalid. In effect, all its doing is hiding the invalid markup
    from the validator (I call this 'cheating').

    --
    David Dorward http://dorward.me.uk/
     
    David Dorward, Oct 20, 2003
    #3
  4. TheKeith

    TheKeith Guest

    "Leif K-Brooks" <> wrote in message
    news:%4Jkb.474$...
    > TheKeith wrote:
    > > I'm putting a paypal form to buy my pictures on my website and using
    > > paypal's automatically generated form buttons. The problem is that the

    form
    > > element itself contains a target attribute, which the validator will not
    > > validate. Is there another way I can target a new window with the name
    > > "paypal." I don't have anything up yet to link you to, but maybe someone
    > > here knows what I'm talking about and can help. Thanks.

    >
    > Not exactly what you want, but take a look at
    > http://www.sitepoint.com/article/1041.


    well I don't really know javascript too well, but this seems to relate more
    to anchor tags than forms. I emailed paypal, but they told me the target was
    necessary. Tehy said they understood my frustration though :) -- who knows
    maybe they'll come up with a new method, incvolving javascript, but for now,
    it's either change my doctype back to transitional (even though it works
    with strict--just doesn't validate), use a different shopping cart service
    (impractical), or just keep researching.
     
    TheKeith, Oct 20, 2003
    #4
  5. David Dorward wrote:

    > If you want to open links in a new window, use a Transitional Doctype.
    > Despite the claims of that article, that rewrites the document at runtime
    > to make it invalid. In effect, all its doing is hiding the invalid markup
    > from the validator (I call this 'cheating').


    Yes, and using font-size in CSS is hiding your <font> elements.
     
    Leif K-Brooks, Oct 21, 2003
    #5
  6. Leif K-Brooks wrote:

    > David Dorward wrote:
    >
    >> If you want to open links in a new window, use a Transitional Doctype.
    >> Despite the claims of that article, that rewrites the document at runtime
    >> to make it invalid. In effect, all its doing is hiding the invalid markup
    >> from the validator (I call this 'cheating').

    >
    > Yes, and using font-size in CSS is hiding your <font> elements.


    Well, if you use things like <span class="heading"> then you might as well
    be using <font> elements, so in a way, yes!

    The method in question is rather cheating. Consider:

    <script type="text/javascript">
    document.write("<mar" + "quee>Scrolling text<\/marq" + "uee>");
    </script>

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?id=132
     
    Toby A Inkster, Oct 21, 2003
    #6
  7. Leif K-Brooks wrote:

    > David Dorward wrote:
    >
    >> If you want to open links in a new window, use a Transitional Doctype.
    >> Despite the claims of that article, that rewrites the document at runtime
    >> to make it invalid. In effect, all its doing is hiding the invalid markup
    >> from the validator (I call this 'cheating').

    >
    > Yes, and using font-size in CSS is hiding your <font> elements.


    No it isn't.

    There is a significant difference between altering a document at run time,
    and applying a style sheet to one.

    --
    David Dorward http://dorward.me.uk/
     
    David Dorward, Oct 21, 2003
    #7
  8. David Dorward wrote:

    > There is a significant difference between altering a document at run time,
    > and applying a style sheet to one.


    Which is exactly my point. If it was using document.write('<form
    target="...">') or form.setAttribute('target', '...'), then I would
    agree with you. The DOM target property on the other hand is unrelated
    to the (X)HTML target attribute, and is still in DOM2. Javascript is for
    effects, just like CSS is for presentation.
     
    Leif K-Brooks, Oct 21, 2003
    #8
  9. David Dorward, Oct 21, 2003
    #9
  10. David Dorward wrote:

    > No it isn't. Its a way of accessing that attribute.


    Why not use setAttribute?

    > From the DOM level 1 specification:
    >
    > For DOM Level 1, the transitional and frameset DTDs for HTML 4.0 are
    > assumed.


    Interesting...
     
    Leif K-Brooks, Oct 22, 2003
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simon
    Replies:
    21
    Views:
    3,873
    Lauri Raittila
    Oct 31, 2004
  2. tshad
    Replies:
    14
    Views:
    888
  3. PapaRandy
    Replies:
    2
    Views:
    356
    Circa
    Jul 11, 2006
  4. Replies:
    7
    Views:
    3,120
  5. Larry Lindstrom
    Replies:
    19
    Views:
    1,308
    Jonathan N. Little
    Jun 12, 2012
Loading...

Share This Page