Solarpitch Posted October 30, 2007 Share Posted October 30, 2007 Hey, I am just trying to put the following into a php echo but it doesnt seem to work. How would I encapsulate this? <td href='javascript:void(0);' onmouseover='return overlib(showRest('Property Results'), STICKY, MOUSEOFF, BACKGROUND, 'designs/popupbkground.png');' onmouseout='return nd();'>link</td> Quote Link to comment https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/ Share on other sites More sharing options...
trq Posted October 30, 2007 Share Posted October 30, 2007 <?php echo "<td href='javascript:void(0);' onmouseover='return overlib(showRest('Property Results'), STICKY, MOUSEOFF, BACKGROUND, 'designs/popupbkground.png');' onmouseout='return nd();'>link</td>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/#findComment-381557 Share on other sites More sharing options...
Solarpitch Posted October 30, 2007 Author Share Posted October 30, 2007 Cheers, Thats the way I was trying it alright but I still cant get my pop up called. It works when the script is not in an echo statement but doesnt when it is like above.... strange ??? Quote Link to comment https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/#findComment-381561 Share on other sites More sharing options...
trq Posted October 30, 2007 Share Posted October 30, 2007 Well, there is no php issue there. Quote Link to comment https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/#findComment-381563 Share on other sites More sharing options...
Solarpitch Posted October 31, 2007 Author Share Posted October 31, 2007 Hey, When I ran with this... "<td href='javascript:void(0);' onmouseover='return overlib(showRest('Property Results'), STICKY, MOUSEOFF, BACKGROUND, 'designs/popupbkground.png');' onmouseout='return nd();'>link</td>"; it gave me... syntax error "return overlib(showRest(" Is there something missing? Quote Link to comment https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/#findComment-382114 Share on other sites More sharing options...
Solarpitch Posted October 31, 2007 Author Share Posted October 31, 2007 Can anyone help with this? Quote Link to comment https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/#findComment-382169 Share on other sites More sharing options...
rajivgonsalves Posted October 31, 2007 Share Posted October 31, 2007 try this echo <<< HEREDOC <td href='javascript:void(0);' onmouseover='return overlib(showRest('Property Results'), STICKY, MOUSEOFF, BACKGROUND, 'designs/popupbkground.png');' onmouseout='return nd();'>link</td> HEREDOC; Quote Link to comment https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/#findComment-382187 Share on other sites More sharing options...
Solarpitch Posted October 31, 2007 Author Share Posted October 31, 2007 Hi, I am not sure how thats supposed to be encapsulated? Not like this I take it... echo <<< HEREDOC <td href='javascript:void(0);' onmouseover='return overlib(showRest('Property Results'), STICKY, MOUSEOFF, BACKGROUND, 'designs/popupbkground.png');' onmouseout='return nd();'>link</td> HEREDOC; Quote Link to comment https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/#findComment-382193 Share on other sites More sharing options...
rajivgonsalves Posted October 31, 2007 Share Posted October 31, 2007 try this <?php echo <<< HEREDOC <td href='javascript:void(0);' onmouseover="return overlib(showRest('Property Results'), STICKY, MOUSEOFF, BACKGROUND, 'designs/popupbkground.png');" onmouseout="return nd();">link</td> HEREDOC; ?> Quote Link to comment https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/#findComment-382205 Share on other sites More sharing options...
Solarpitch Posted October 31, 2007 Author Share Posted October 31, 2007 No, still no joy. Just seems to crash the page now. It works perfect when its not been echoed so I cant understand what the problem is Quote Link to comment https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/#findComment-382216 Share on other sites More sharing options...
rajivgonsalves Posted October 31, 2007 Share Posted October 31, 2007 can you put some chucks of your code maybe more than 5 lines before and after its echoed ? Quote Link to comment https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/#findComment-382224 Share on other sites More sharing options...
Solarpitch Posted October 31, 2007 Author Share Posted October 31, 2007 Yes, here's the actual function in which its been called... function random_results() { dbconnect(); $row2 = array(); $sql = "SELECT * FROM property_info ORDER BY RAND() LIMIT 3"; $result = mysql_query($sql) or die(mysql_error()); while(($row = mysql_fetch_row($result)) != false) { $location = $row[2]; $location = getlocationname($location); $type = $row[3]; $type = gettypename($type); echo "<table width='140' id='random_results' border='0' cellpadding='0' cellspacing='0'>"; echo "<tr>"; echo "<td href='javascript:void(0);' onmouseover='return overlib(showRest2(" . $row[18] . " ," . $row[3] ."), MOUSEOFF, BACKGROUND);' onmouseout='return nd();'>link</td>"; echo "</tr>"; echo "<tr>"; echo "<td>€". $row[4] . ", " . $row[18] . " Bedrooms</td>"; echo "</tr>"; } $table .= "</table>"; return $table; } Quote Link to comment https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/#findComment-382228 Share on other sites More sharing options...
rajivgonsalves Posted October 31, 2007 Share Posted October 31, 2007 try this for that one line echo "<td href='javascript:void(0);' onmouseover=\"return overlib(showRest2('" . $row[18] . "' ,'" . $row[3] ."'), MOUSEOFF, BACKGROUND);\" onmouseout=\"return nd();\">link</td>"; Quote Link to comment https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/#findComment-382230 Share on other sites More sharing options...
Solarpitch Posted October 31, 2007 Author Share Posted October 31, 2007 Bingo! Thats excellent! Thanks a mill for your help with this. Been driving me crazy the past 3 hours!.. thanks again Quote Link to comment https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/#findComment-382243 Share on other sites More sharing options...
rajivgonsalves Posted October 31, 2007 Share Posted October 31, 2007 anytime dude! no proble at all Quote Link to comment https://forums.phpfreaks.com/topic/75426-solved-quick-syntax-question/#findComment-382245 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.