[ic] Path in javascript function
Götz Verdieck
interchange-users@icdevgroup.org
Wed Oct 2 02:32:02 2002
Hi,
I have a problem with the path expanding.
I use the following path :
src="__THEME_IMG_DIR__pic_allg/pic_wahl.gif"
When I have a look at the html source the result I get is:
src="/kabelshop/images/deutsch/foundation/pic_allg/pic_wahl.gif"
That¹s exactly what I expected but when I use this
in a Javascript code like:
.......
<script type="text/javascript" language="JavaScript1.2"><!--
function staffelwahl() {
var bild2 = new Image();
artgesamt = eval(document.berechnen.gesamt.value)+eval([scratch artquant]);
staffel = new Array([scratch staffel_komma]);
for ( var i= 0; i <=staffel.length-1; i++) {
{
if ((staffel[i] <= artgesamt) && (artgesamt < staffel[i+1])) {
bild2.src="__THEME_IMG_DIR__pic_allg/pic_wahl.gif";
document.wahl[i].src = bild2.src;
}
else
{
bild2.src="__THEME_IMG_DIR__pic_allg/pic_nwahl.gif";
document.wahl[i].src = bild2.src;
}
........
I get:
bild2.src="foundation/pic_allg/pic_wahl.gif"
But I would like to see:
bild2.src="/kabelshop/images/deutsch/foundation/pic_allg/pic_wahl.gif"
Where is the first part (/kabelshop/images/deutsch/) gone ?
I tested this again and again. What am I doing wrong ?
Best regards
Götz Verdieck
==============================
Goetz.Verdieck@com4office.de