You certainly can't do it like this. However, using jQuery (it is a jQuery list, after all ;) ), it's fairly simple: <p id="noJavascriptPlaceholder">xyz</p>
Then in the Javascript (forget your document.ready): $( '#noJavascriptPlaceholder' ).attr( 'id', myGlobalVariable ); Of course, if you are well-versed in jQuery selector system, then there is likely a cleaner way to do it than using a placeholder ID. Hope this is useful! Chuck Harmston http://chuckharmston.com On Tue, Apr 7, 2009 at 11:53 AM, Rick Faircloth <r...@whitestonemedia.com>wrote: > I would like to be able to do something as simple as > > <p id=”<script>myGlobalVariable</script>”>xyz</p>, > > but apparently the “” marks are a problem. > > > > I’m able to output a global variable value like this: > > <p>The value of myGlobalVariable is <script>myGlobalVariable</script>.</p> > > > > Is there some way to use global variable values with an id attribute? > > > > Thanks, > > > > Rick > > > > * > --------------------------------------------------------------------------------------------------------------------------------------- > * > > *"It has been my experience that most bad government is the result of too > much government." - Thomas Jefferson* >