Onbekende variable

Status
Niet open voor verdere reacties.

Miklas

Gebruiker
Lid geworden
9 mrt 2008
Berichten
30
So, in my PHP script, I let Javascript variables generated.

for example

var mx_1637;
mx_1637 = "Test_value"
I got

<td width="25" height="25"><a onmouseover="javascript:showinfo(1637)" onmouseout="javascript:stopinfo(1637)" href="thisisatesturl">Test</a></td>

and

function showinfo(d){
document.getElementById("mx").innerHTML = "mx_"+d
}


In the last part is the Problem. The parameter of showinfo (d) is the matching number of var mx_1637; but how do i let JS echo that variable, cus now, with "mx_"+d it just echo's : mx_1637...

So, concrete, The problem is that i have to echo a variable with a certain name.
 
The language is Dutch on this forum. I close this topic.
 
Status
Niet open voor verdere reacties.

Nieuwste berichten

Terug
Bovenaan Onderaan