Guest Posted February 15, 2008 Posted February 15, 2008 Hello forum I need to paste java script somewhere inside information Box How can I manage this I get error when I try to paste it inside ?> (outside ?> is OK but the appearance on frontpage is not nice) this is infobox script, I want to paste javascript of charts in infobox, how can I manage this <!-- information //--> <tr> <td><?php $info_box_contents = array(); $info_box_contents[] = array('text' => Currencies); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array(); <-------------------------------------Somewhere here! new infoBox($info_box_contents); ?> I want to paste <!-- start Boom.ge currency bar code--> <script language="javascript" src="http://currency.boom.ge/moduls/currency_bar.php?id=7&w=173&h=91"> </script>
Guest Posted February 15, 2008 Posted February 15, 2008 What are you trying to achieve? All I can tell you is that this is not how it's done. Anyway, if you insist on doing it, all you have to do is stop PHP code, insert your code and then again start PHP: $info_box_contents = array(); $info_box_contents[] = array(); ?> <!-- start Boom.ge currency bar code--> <script language="javascript" src="http://currency.boom.ge/moduls/currency_bar.php?id=7&w=173&h=91"> </script> <?php new infoBox($info_box_contents); ?>
Guest Posted February 15, 2008 Posted February 15, 2008 See this http://gbn.ge/index.php?op=list&language=EN You see boxes below and error:  this error occurs because something is not right with information6.php which includes java script and lots of script of charts so I want to fix this proble, I found out that the problem reallyexists in Information box, in which I have pasted this scripts
Guest Posted February 15, 2008 Posted February 15, 2008 I still don’t know what you are trying to achieve. Are you trying to replace the original dropdown in currencies with the stuff that’s on http://gbn.ge/index.php?op=list&language=EN or do you want to keep the original dropdown and just add the stuff under it? In the first case, change your currencies.php into this: <?php /* $Id: currencies.php,v 1.16 2003/02/12 20:27:31 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ if (isset($currencies) && is_object($currencies)) { ?> <!-- currencies //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_CURRENCIES); new infoBoxHeading($info_box_contents, false, false); ?> ******* add your JavaScript here************ </td> </tr> <!-- currencies_eof //--> <?php } ?> In the second case, just add the script at the end of currencies.php without changing anything. I can’t help you with information6.php because I don’t know what it is, but it certainly isn’t a part of osCommerce.
Mav666 Posted February 15, 2008 Posted February 15, 2008 Didn't I tell you how to fix it yesterday? Even at a Mensa convention someone is the dumbest person in the room.
Guest Posted February 15, 2008 Posted February 15, 2008 Didn't I tell you how to fix it yesterday? Yoesterday or two day ago you helped me to fix descending problem in product listing :) I cannot fix this alone :(
Mav666 Posted February 15, 2008 Posted February 15, 2008 Maybe I'm starting to imagine things - I could have sworn you posted the same question with the answer simply missing a ' Anyway - the part you want to put in the box needs to go in the array you pointed to - like this: $info_box_contents[] = array('text' => '<!-- start Boom.ge currency bar code--> <script language="javascript" src="http://currency.boom.ge/moduls/currency_bar.php?id=7&w=173&h=91"> </script>'); Even at a Mensa convention someone is the dumbest person in the room.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.