onmouseover="showToolTip(event,texthere);return false" onmouseout="hideToolTip();"
How do you echo this?
I know you do "" for example if you have just one type of inline quote but if your using javascript as part of coding and your generating an aspect of code via php echo or pring does anyone know how you handle the above code to echo correctly?
echo (?);
$blah = "onmouseover="showToolTip(event,texthere);return false" onmouseout="hideToolTip();"";
Addslashes($blah);
:)
Or just \ every single speech mark.
Quote from: M3ta7h3ad$blah = "onmouseover="showToolTip(event,texthere);return false" onmouseout="hideToolTip();"";
Addslashes($blah);
:)
Or just \ every single speech mark.
Ill try the slashes the above value thing does not work, if you second look it you will see why becuase I tried that already :)
May do more variables spilt the showtooltip and the mousover as two variables, thanks though should help and all else fails as you say use the \
You have to escape like in all languages.
Its a pain in the arse when youre using a string literal for regular expressions.
\\\\\\\\\\\"
I always try to avoid it but I think with Ajax taking off as it is probably going to get more common and a bit anoying