Re: Advice: how best to create an image



tosbalok@xxxxxxxxx said:

Now here's the problem: I also have to a copy of the button that is
visible when the page loads. That's easy enough to do *if* I simple
type out the src= attribute of the image. I don't want to do that. I
have this constant defined in the .js file. I want to make use of it.

Your best bet is to bite the bullet and hard-code the src attribute,
but then replace it with the value from your .js file in an onLoad
handler (or inline Javascript, if you prefer).
That way, you've still got an image if Javascript is disabled.


--

.


Quantcast