Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Syntax Correction


juniorprg

Recommended Posts

Posted

Im trying to put a box with a link which will pop up but having syntax error

can anyone help?

 

<script type="text/javascript">

function openpopup(popurl){

var winpops=window.open(popurl,"","width=625,height=150")

}

</script>

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_CALCULATOR);

 

new infoBoxHeading($info_box_contents, false, false);

 

$info_box_contents = array();

$info_box_contents[] = array('text' => '<a href= "java script:openpopup('catalog/convert.htm')">'. BOX_CALCULATOR_CONVERT . </a><br>')';

 

new infoBox($info_box_contents);

?>

</td>

</tr>

l8ter

Posted

The error im getting is

 

Parse error: parse error, unexpected T_STRING, expecting ')' in D:\hshome\hdinnova\hdinnovation.com\catalog\includes\boxes\converter.php on line 28

 

Above I have posted line 28 ie

 

$info_box_contents[] = array('text' => '<a href= "java script:openpopup('catalog/convert.htm')">'. BOX_CALCULATOR_CONVERT . </a><br>')';

l8ter

Posted

try:

 

$info_box_contents[] = array('text' => '<a href= "java script:openpopup('catalog/convert.htm')">'. BOX_CALCULATOR_CONVERT . '</a><br>')';

Your online success is Paramount.

Posted

possibly:

 

$info_box_contents[] = array('text' => '<a href= "java script:openpopup('catalog/convert.htm')">'. BOX_CALCULATOR_CONVERT . '</a><br>');

Your online success is Paramount.

Archived

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

×
×
  • Create New...