[Javascript] multiple languages

Shawn Milo milo at linuxmail.org
Wed May 26 10:16:56 CDT 2004


The easy way to do this, in my experience, is
double-double-quote.

Response.Write "<span style=""background: yellow;"">"

This is much nicer than the way I used to do it:

Response.Write "<span style=" & chr(34) & "background: yellow;" & chr(34) & ">"

I don't know if this will work in your application, but if you're
using ASP, it should work.

Shawn



----- Original Message -----
From: "Mike Dougherty" <mdougherty at pbp.com>
Date: Wed, 26 May 2004 10:51:43 -0400
To: "[JavaScript List]" <javascript at LaTech.edu>
Subject: Re: [Javascript] multiple languages

> It gets especially confusing when you're using one language to generate the code for another 
> language:  ASP/vbscript to generate Javascript, or SQL to generate HTML...  I completely 
> sympathize
> 
> lcHTML += "<tag onClick=\"alert('test');\" />"
> 
> I feel a little guilty writing code like that, because some day another developer will have to 
> make sense of it.  (although it'll probably be ME)
> 
> >My bad, you can indeed use single- or double quotes around your attribute values. I'm developing 
> >in too many languages at once here, sorry. I'd say you should add the type attribute to your 
> >style block, though.
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list