Loading ...
Sorry, an error occurred while loading the content.

Re: Script Tag Descending From Fieldset

Expand Messages
  • douglascrockford
    ... Why do you want to put a script in a fieldset?
    Message 1 of 3 , Nov 17, 2012
    View Source
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Owen" <eclipsechasers2@...> wrote:
      >
      > While using jslint on some html with inline script, I run into the following error:
      > A '<script>' must be within '< body div frame head iframe p pre span >'.
      > Jslint halts immediately when detecting this problem.
      >
      > A much abridged version of my html is:
      > <html>
      > <head> … </head>
      > <body>
      > <form>
      > <fieldset>
      > <legend> … </legend>
      > <script> …
      >
      > This code does seem to be valid html.
      > Is there any reason (standards, style, whatever) that jslint requires that script tags should not descend from fieldset tags in addition to the others which it permits?


      Why do you want to put a script in a fieldset?
    • Owen
      I am trying to analyze some code I ve inherited which does this 20+ times. I can wrap each of them in divs if need be; that just seems like busy work ,
      Message 2 of 3 , Nov 17, 2012
      View Source
      • 0 Attachment
        I am trying to analyze some code I've inherited which does this 20+ times. I can wrap each of them in divs if need be; that just seems like "busy work", however. Mostly I asked the question to learn the rationale behind the rule; knowing such makes it easier to follow going forward.

        --- In jslint_com@yahoogroups.com, "douglascrockford" <douglas@...> wrote:
        >
        > --- In jslint_com@yahoogroups.com, "Owen" <eclipsechasers2@> wrote:
        > >
        > > While using jslint on some html with inline script, I run into the following error:
        > > A '<script>' must be within '< body div frame head iframe p pre span >'.
        > > Jslint halts immediately when detecting this problem.
        > >
        > > A much abridged version of my html is:
        > > <html>
        > > <head> … </head>
        > > <body>
        > > <form>
        > > <fieldset>
        > > <legend> … </legend>
        > > <script> …
        > >
        > > This code does seem to be valid html.
        > > Is there any reason (standards, style, whatever) that jslint requires that script tags should not descend from fieldset tags in addition to the others which it permits?
        >
        >
        > Why do you want to put a script in a fieldset?
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.