Graham:
I don't like depending on JavaScript for this.
I think your modification to html:base would be perfect.
I have voted for it.
Thanks,
Neil
--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com
> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Graham Reeds
> Sent: Monday, February 14, 2005 10:37 PM
> To: [email protected]
> Subject: Re: Handle images path in one place
>
>
> I do this in a different way to everyone else:-)
>
> I use this piece of JavaScript in the <head> of every jsp file:
>
> if (window.location.href.indexOf("localhost") >= 1)
> { document.write('<base href="http://localhost/mysite/" />'); }
> else
> { document.write('<base href="http://www.mysite.com/" />'); }
>
> Which writes in the <base> tag for the sole purpose of
> accessing images
> via id's. I made an enhancement request in bugzilla which
> you can vote
> on *hint*
> (http://issues.apache.org/bugzilla/show_bug.cgi?id=33426) to
> make a change to the <html:base> tag to allow it to take the place of
> this javascript.
>
> Thanks, G.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]