These approaches feel a bit hacky to me. It might be an idea to review why
you are using inline JS as it really shouldn't be necessary in most cases.
There are plenty of ways of triggered JS early on elements if that is the
reason of putting it inline. What are the times you find the js needs to be
inline?

Ed

On Thu, Jul 1, 2010 at 4:25 AM, tee <weblis...@gmail.com> wrote:

> If you use XHTML doctype, you can add CDATA comment, this will prevent
> possible validation errors.
>
> Example:
> <script type="text/javascript">
>  /* <![CDATA[ */
>  jQuery(document).ready(function(){
>         jQuery("ul.sf-menu").superfish();
>     });
> /* ]]> */
> </script>
>
> I mostly work on Magento projects these days that use inline script
> heavily, experience show that lack of CDATA comment doesn't always trigger
> validation error.
>
> tee
>
> On Jun 30, 2010, at 1:42 PM, Susan Grossman wrote:
>
>
>> Raises another question.  How does one handle inline javascript these
>> days?  Because of the dyanmic nature of a site sometimes the JS  can't
>> go in external URL's   Links with eventhandlers.  etc.
>>
>
>
>
> *I find that adding into these meta tags into the header can solve the
> inline validation issues sometimes, depending on the doctype.
> *
>
> *    <meta http-equiv="Content-Style-Type" content="text/css" />
>
>     <meta http-equiv="Content-Script-Type" content="type" />*
>
>
>
> *******************************************************************
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: memberh...@webstandardsgroup.org
> *******************************************************************
>


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to