-3

I want to have a popup on mouseover... but it is not working.

In Javascript I am simply giving alert, the code works fine when I don't pass the parameters or send hard coded value but when I passed parameter using php tag it doesn't work.

<input type="hidden" name="val" value="<?php echo $values[0]; ?>" />

<div style=" padding:3px; border-top:solid 1px ;" id="<?php echo $values[0]; ?>" 
     class="display_box " onmouseover="he(<? print 't' ?>)"  align="left"
     onclick="document.getElementById('search_text').value='<?php print $values[0]; ?>';
document.getElementById('instant_display').style.visibility='hidden'">

<?php echo $values[0]; ?>
</div>
HTTP
  • 1,674
  • 3
  • 17
  • 22

1 Answers1

0

Assuming my understanding of your question is correct, can you try doing it this way? Note: I have added a single quote before and after the PHP tag because your function seems to expect a string as input.

onmouseover="he('<?php echo 't' ?>')"
Harry
  • 87,580
  • 25
  • 202
  • 214