# Javascript can't work inside Php

**URL:** <https://forum.kirupa.com/t/javascript-cant-work-inside-php/153621>\
**Category:** programming\
**Created:** [July 3, 2005, 3:28am UTC](https://forum.kirupa.com/t/javascript-cant-work-inside-php/153621 "2005-07-03T03:28:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kitaeshi](https://avatars.discourse-cdn.com/v4/letter/k/9f8e36/32.png) [@kitaeshi](https://forum.kirupa.com/u/kitaeshi)\
**Post date:** [July 3, 2005, 3:28am UTC](https://forum.kirupa.com/t/javascript-cant-work-inside-php/153621/1 "2005-07-03T03:28:13Z")

</div>

Hi all, when i am coding php, i want to create a popup page, so i use javascript, but the browser cannot display the php code inside javascript.

The print $front\_link[ProdID] cannot come out, as this is a shopping cart site, its not wiseable to create one page for one product.

\<a href=“javascript:windowopen(’\<?php print $front\_link[ProdID] ?\>’)”\>Front\</a\>

I hope your can help me solve this problems or advise me how to make the php correctly display in javascripts.

Thxs for reading

Life’s short, let’s make it sweet.  
Cheers!
