c2c in javascript pop-up script?
-
Hi. I’m using the c2c_get_custom plugin, and I’m trying to use it to display all my custom field key/valueu pairs in a pop-up window…using the following brief javascript pop-up window function:
‘<script language=”javascript”>
function openPage() {
OpenWindow=window.open(“”, “newwin”, “height=250, width=250,toolbar=no,scrollbars=”+scroll+”,menubar=no”);
OpenWindow.document.write(“<h1><?php echo c2c_get_custom(‘myKey’); ?></h1>”)
OpenWindow.document.close()
self.name=”main”
}
</script>
‘Unfortunately it doesn’t work…the php echo doesn’t return anything, and I just end up with a pop-up window that is empty: <h1></h1>
Is there a reason the c2c functions don’t work? Is it because it’s in a <script> or a function?
Any help will be appreciated.
Thanks,
Amir
- The topic ‘c2c in javascript pop-up script?’ is closed to new replies.