Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Javascript inside a php box?


on2dvd

Recommended Posts

Hi

 

I am having difficulty putting my javascript (which is for Live Help) inside a new includes box.

It seems that when I add it below the php tag it does not go inside the box but below it and when I add itinside the php code it gives me an error.

Can someone please help.

Link to comment
Share on other sites

Paste your code for the box here

 

This is the box code

 

<?php

?>

<!-- information //-->

<tr>

<td><?php

$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => 'Live Help'

);

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('align' => 'center',

'text' => tep_image(DIR_WS_IMAGES . 'soon.gif') );

 

new infoBox($info_box_contents);

?></td>

</tr>

<!-- information_eof //-->

 

 

And this is the java script code.

 

<!-- BEGIN Help Center Live Code, Copyright ? 2005 UberTec Ltd. All Rights Reserved --></font>

<div id="div_initiate" style="position:absolute; z-index:1; top: 40%; left:40%; visibility: hidden;"><a href="java script:Live.initiate_accept();"><img src="http://on2dvd.com.au/help/templates/Bliss/images/initiate.gif" border="0"></a><br><a href="java script:Live.initiate_decline();"><img src="http://on2dvd.com.au/help/templates/Bliss/images/initiate_close.gif" border="0"></a></div>

<script type="text/javascript" language="javascript" src="http://on2dvd.com.au/help/class/js/include.php?live&departmentid=1"></script>

<!-- END Help Center Live Code, Copyright ? 2005 UberTec Ltd. All Rights Reserved -->

 

Thanks for taking a look.

Link to comment
Share on other sites

This is the box code

 

<?php

?>

<!-- information //-->

<tr>

<td><?php

$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => 'Live Help'

);

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('align' => 'center',

'text' => tep_image(DIR_WS_IMAGES . 'soon.gif') );

 

new infoBox($info_box_contents);

?></td>

</tr>

<!-- information_eof //-->

And this is the java script code.

 

<!-- BEGIN Help Center Live Code, Copyright ? 2005 UberTec Ltd. All Rights Reserved --></font>

<div id="div_initiate" style="position:absolute; z-index:1; top: 40%; left:40%; visibility: hidden;"><a href="java script:Live.initiate_accept();"><img src="http://on2dvd.com.au/help/templates/Bliss/images/initiate.gif" border="0"></a><br><a href="java script:Live.initiate_decline();"><img src="http://on2dvd.com.au/help/templates/Bliss/images/initiate_close.gif" border="0"></a></div>

<script type="text/javascript" language="javascript" src="http://on2dvd.com.au/help/class/js/include.php?live&departmentid=1"></script>

<!-- END Help Center Live Code, Copyright ? 2005 UberTec Ltd. All Rights Reserved -->

 

Thanks for taking a look.

 

 

<?php

?>

<!-- information //-->

<tr>

<td><?php

$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => 'Live Help'

);

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

 

$the_text = '<div id="div_initiate" style="position:absolute; z-index:1; top: 40%; left:40%; visibility: hidden;"><a href="java script:Live.initiate_accept();"><img src="http://on2dvd.com.au/help/templates/Bliss/images/initiate.gif" border="0"></a><br><a href="java script:Live.initiate_decline();"><img src="http://on2dvd.com.au/help/templates/Bliss/images/initiate_close.gif" border="0"></a></div>

<script type="text/javascript" language="javascript" src="http://on2dvd.com.au/help/class/js/include.php?live&departmentid=1"></script>';

 

$info_box_contents[] = array('align' => 'center',

'text' => $the_text );

 

new infoBox($info_box_contents);

?></td>

</tr>

<!-- information_eof //-->

Treasurer MFC

Link to comment
Share on other sites

<?php

?>

<!-- information //-->

<tr>

<td><?php

$info_box_contents = array();

$info_box_contents[] = array('align' => 'left',

'text' => 'Live Help'

);

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

 

$the_text = '<div id="div_initiate" style="position:absolute; z-index:1; top: 40%; left:40%; visibility: hidden;"><a href="java script:Live.initiate_accept();"><img src="http://on2dvd.com.au/help/templates/Bliss/images/initiate.gif" border="0"></a><br><a href="java script:Live.initiate_decline();"><img src="http://on2dvd.com.au/help/templates/Bliss/images/initiate_close.gif" border="0"></a></div>

<script type="text/javascript" language="javascript" src="http://on2dvd.com.au/help/class/js/include.php?live&departmentid=1"></script>';

 

$info_box_contents[] = array('align' => 'center',

'text' => $the_text );

 

new infoBox($info_box_contents);

?></td>

</tr>

<!-- information_eof //-->

 

You are a legend my friend. :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...