[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Path in javascript function
Hi,
I have a problem with the path expanding.
I use the following path :
src=3D"__THEME_IMG_DIR__pic_allg/pic_wahl.gif"
When I have a look at the html source the result I get is:
src=3D"/kabelshop/images/deutsch/foundation/pic_allg/pic_wahl.gif"
That=B9s exactly what I expected but when I use this
in a Javascript code like:
.......
<script type=3D"text/javascript" language=3D"JavaScript1.2"><!--
=20
function staffelwahl() {
var bild2 =3D new Image();
artgesamt =3D eval(document.berechnen.gesamt.value)+eval([scratch artquant]);
staffel =3D new Array([scratch staffel_komma]);
for ( var i=3D 0; i <=3Dstaffel.length-1; i++) {
{
if ((staffel[i] <=3D artgesamt) && (artgesamt < staffel[i+1])) {
bild2.src=3D"__THEME_IMG_DIR__pic_allg/pic_wahl.gif";
document.wahl[i].src =3D bild2.src;
}
else
{
bild2.src=3D"__THEME_IMG_DIR__pic_allg/pic_nwahl.gif";
document.wahl[i].src =3D bild2.src;
}
........
I get:
bild2.src=3D"foundation/pic_allg/pic_wahl.gif"
But I would like to see:
bild2.src=3D"/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=F6tz Verdieck
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Goetz.Verdieck@com4office.de