PDA

View Full Version : PHP in Javascript


~Brain~Wav~
10-15-2002, 07:27 PM
I'm working on a hack for one of my boards ( http://www.dragoon-networks.net ) and I've encountered a problem.

The hack is two parts, one part checks to see whether the board is in a frame, the other consists of KuraFire's Register/UserCP button hack.

Basically, when the board is in a frame, the banner doesn't show, when its outside, it does. My problem is that the browser doesn't want to parse the $reg_ucp hack within the banner when it displays...

Any ideas on how to make this work?

cpradio
10-26-2002, 12:16 PM
why not make a php file write javascript code and incorporate it via the <script> tag:

PHP File (javascript.php):
<?php
echo "document.write('<img src=\"banner.jpg\">');"
?>

HTML Code:
<script type="text/javascript" src="javascript.php"></script>