Click to See Complete Forum and Search --> : document.write(graphic.gif) possible?


jitseschaafsma
06-18-2003, 05:41 AM
Let me explain.
I have made a javascript generates a string that is called in building my HTML page.
This is how a call it :
document.write(addsubtotal([FMP-Field:Cummuren],"-1"))
dependent on the value of [FMP-Field:Cummuren] the function addsubtotal generates a string.
This works great.
For example the string can be "subtotal : " and then followed by a number :
subtotal : 2000
Well, now i want to include a graphic (actually the euro symbol).

subtotal : <euro symbol graphic> 2000
My question is how can i modify my addsubtotal routine to return a composite string (text and a graphic).
thanks
jitse

This is the addsubtotal routine:

function addsubtotal(var1,var2)
{
var retstr=""

if (currweeknr==0)
{
currweeknr=var2
subtotal=var1
genweeknr=1
}
else
{
if (parseInt(var2)==currweeknr)
{ subtotal+=var1
genweeknr=0
}
else
{ retstr="Subtotaal : "+parseFloat(subtotal)
currweeknr=var2
subtotal=var1
genweeknr=1
}
}
return(retstr)
}

Charles
06-18-2003, 05:49 AM
The euro symbol is a standard character but its not available with all fonts.

<span style="font-family:'Times New Roman'">&amp;euro;100</span>

jitseschaafsma
06-18-2003, 05:58 AM
Can you help me with an excuse for using a euro graphic :D :D :D