UnknownPlayer Posted March 31, 2011 Share Posted March 31, 2011 How can i run this javascript command show_seasons(some_value), in php code, i mean without any action ? I have this php code: if ($sid == $s_id) { javascript:show_seasons($sid); } How to do that? Thanks.. Link to comment https://forums.phpfreaks.com/topic/232282-execute-javascript-code-in-php/ Share on other sites More sharing options...
cyberRobot Posted March 31, 2011 Share Posted March 31, 2011 JavaScript is a client-side language while PHP works on the server-side, so there isn't a way for them to work together. Is there something that you're doing in JavaScript that you're not sure how to do in PHP? Or are you just trying to save time by not rewriting the JavaScript functionality? Link to comment https://forums.phpfreaks.com/topic/232282-execute-javascript-code-in-php/#findComment-1194913 Share on other sites More sharing options...
UnknownPlayer Posted March 31, 2011 Author Share Posted March 31, 2011 Im just trying to use that javascript code, but i can make same code which i use in javascript/ajax command.. Thanks.. Link to comment https://forums.phpfreaks.com/topic/232282-execute-javascript-code-in-php/#findComment-1194918 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.