flemingmike Posted January 23, 2011 Share Posted January 23, 2011 hello. im trying to get the following to work. any ideas for me? Text[12]=["Job Description","$description it "] it is in a .js file. Quote Link to comment Share on other sites More sharing options...
President Obama Posted January 23, 2011 Share Posted January 23, 2011 <?php echo $description; ?> ? That should work, shouldn't it? Quote Link to comment Share on other sites More sharing options...
flemingmike Posted January 23, 2011 Author Share Posted January 23, 2011 i tried that. maybe im doing this a harder way that needed. what i have is a calendar that displays what i have to do. i want to be able to put my mouse over and have it show me a description in a small box. Quote Link to comment Share on other sites More sharing options...
codefossa Posted January 23, 2011 Share Posted January 23, 2011 Why do you have PHP in a Javascript file? Just make a PHP file and include it in the page you wish to use the array. You can get your requested result by using the title attribute. Quote Link to comment Share on other sites More sharing options...
flemingmike Posted January 23, 2011 Author Share Posted January 23, 2011 i tried the title way. the very first description started with i've. the ' isnt compatible with title. is there a way around this? Quote Link to comment Share on other sites More sharing options...
codefossa Posted January 23, 2011 Share Posted January 23, 2011 i tried the title way. the very first description started with i've. the ' isnt compatible with title. is there a way around this? Don't use a ' to echo, and if needed use a \' or \" to wrap the attribute. Quote Link to comment Share on other sites More sharing options...
flemingmike Posted January 23, 2011 Author Share Posted January 23, 2011 so if im echoing: echo "<a href='viewlog.php?id=".$id."' title='$description'><font color='#F70F02' size='3'>".$clientname."".$statusout."</font><font size='3' color='#ffffff'><br />".$starttime1." - ".$esttime1."</a><br />"; $description is what could have " or ' coming from mysql as well as possible other symbols. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.