I have the following Problem
I get a variable from PHP via:
echo $var
Actually this takes place in:
<a href:"..\test.php?go=<?php echo $var ?>">
And to a page where you can get more info about $var
...
Today i learned about the display
attribute from a div, so i can display the info via Ajax direct in my actual page. So, I tried:
<Label id="123" onclick="doJS(<?php echo $var ?>)> Click ME </Label>
But this doesn't work, I cant click the label, just nothing happens.
How can this be solved?
You have a typo in your code.
Replace
<Label id="123" onclick="doJS(<?php echo $var ?>)> Click ME </Label>
By
<Label id="123" onclick="doJS(<?php echo $var ?>)"> Click ME </Label>
So you should try:
<label id='123' onclick="doJS(<?=$_GET['go']?>)"> Click ME </label>