Guest Posted June 6, 2004 Share Posted June 6, 2004 Can anyone tell me, is there something wrong with the code below: <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => BOX_HEADING_LIVEHELP ); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => '<html><head><script language="JavaScript" src="http://trial2.clickchatsold.com/D6/Popcorn.js"></script><title></title></head><body topmargin="0" leftmargin="0"><a href="javascript:popChatWin(0)"><img src="http://trial2.clickchatsold.com/PL/Popcorn.1.0.gif" width="100" border="0"></a></body> </html>' . '</a>' ); new infoBox($info_box_contents); ?></td></tr><!-- livehelp_eof //--> This is for a live chat box, but as soon as I insert it my coolmenu stops working properly. Any ideas? www.popcorn-uk.com Thanks Mark Link to comment Share on other sites More sharing options...
Guest Posted June 6, 2004 Share Posted June 6, 2004 This is the jave script it is conflicting with: <script LANGUAGE="JavaScript1.2" SRC="includes/menu_animation.js"></SCRIPT> Does this make any sense to anyone? Thanks Mark Link to comment Share on other sites More sharing options...
vasttech Posted June 6, 2004 Share Posted June 6, 2004 Without seeing all the code and knowing where you are trying to put this and how it is supposed to operate, my best guess would be that the error is because of this part of the code: $info_box_contents[] = array('align' => 'center', 'text' => '<html><head><script language="JavaScript" src="http://trial2.clickchatsold.com/D6/Popcorn.js"></script><title></title></head><body topmargin="0" leftmargin="0"><a href="javascript:popChatWin(0)"><img src="http://trial2.clickchatsold.com/PL/Popcorn.1.0.gif" width="100" border="0"></a></body> </html>' In the 'text' you are trying to create a whole new page with the <html><head><title><body> tags. If this box is being created within a page, then yes you are going to have errors since it will confuse the browser by having two of each of these tags on the page. The only thing that should be in the info box is the <a> and the <img> tags. You can delete the others except for the <script> tag which should be put on the page, in the <head> tag. osCommerce Knowledge Base osCommerce Documentation Contributions Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.