iPixel Posted April 22, 2009 Share Posted April 22, 2009 Any idea why this doesnt work and how i can make it work ? document.getElementById("boxcontent_Optum").innerHTML = "<?php include_once('addnewemployee.php'); ?>"; if i were to replace the <?php include_once('addnewemployee.php'); ?> part with just text "Here's some text" it works, so my assumption is it doesnt really like the php? Thanks for the help. Link to comment https://forums.phpfreaks.com/topic/155208-solved-innerhtml-with-php-code/ Share on other sites More sharing options...
Maq Posted April 22, 2009 Share Posted April 22, 2009 It's because PHP lives on the server and is pre-processed for HTML output. You can't alter PHP code client side like that. Link to comment https://forums.phpfreaks.com/topic/155208-solved-innerhtml-with-php-code/#findComment-816485 Share on other sites More sharing options...
iPixel Posted April 22, 2009 Author Share Posted April 22, 2009 Yea im an idiot haha, had meself a blonde moment. Link to comment https://forums.phpfreaks.com/topic/155208-solved-innerhtml-with-php-code/#findComment-816531 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.