unistar Posted October 11, 2002 Posted October 11, 2002 Trying to add: <SCRIPT type="text/javascript" src="http://www.mydomain.com/xaramenu.js"></SCRIPT> <SCRIPT type="text/javascript" src="http://www.mydomain.com/camden.js" webstyle3=""></SCRIPT> to categories.php. I want it to show to the left or right of the "categories" heading as a drop down menu. I did some reading and it should be(?): echo '<SCRIPT type="text/javascript" src="http://www.mydomain.com/xaramenu.js"></SCRIPT> <SCRIPT type="text/javascript" src="http://www.mydomain.com/camden.js" webstyle3=""></SCRIPT>'; It placed it like this: ------------------------------------------------------------------------------------ <!-- categories //--> <tr><td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_CATEGORIES ); echo '<SCRIPT type="text/javascript" src="http://www.mydomain.com/xaramenu.js"></SCRIPT> <SCRIPT type="text/javascript" src="http://www.mydomain.com/camden.js" webstyle3=""></SCRIPT>'; new infoBoxHeading($info_box_contents, true, false); $categories_string = ''; ------------------------------------------------------------------------------------- What's the correct syntax, location?
unistar Posted October 12, 2002 Author Posted October 12, 2002 I checked the php.net manual/tutorial and that is the correct syntax. Am I doing somethign wrong or it won't work that way?
veverkap Posted October 13, 2002 Posted October 13, 2002 you are putting it in the title header for the box. put it further down in the second contents string. Patrick Patrick
unistar Posted October 13, 2002 Author Posted October 13, 2002 That's exactly where I want it. Below and on top works fine under HTML. To put in the header it would have to be inside the PHP (as bove) I think? I'll keep checking the php tutorials :biggrin:
unistar Posted October 19, 2002 Author Posted October 19, 2002 Well it took me over a week but I worked around it. Instead of trying to put the menu on the heading I made the menu- the heading: <!-- categories //--><tr><td><SCRIPT type="text/javascript" src="http://www.mydomain.com/xaramenu.js"></SCRIPT> <SCRIPT type="text/javascript" src="http://www.mydomain.com/camden.js" webstyle3=""></SCRIPT> </tr></td> <tr><td><?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_CATEGORIES ); // new infoBoxHeading($info_box_contents, true, false); $categories_string = ''; So the result is that I have a heading that looks exactly like categories (colors an all) but when you hover on top you discover it's a menu. You don't loose any space or functionality and you gain a small, fast and functional menu. The changes made to the code are adding the javascript menu below the "<!-- categories -->" and within <tr><td></tr></td> and commenting out "//" the "new infoboxheading" line. Please look on top for the example!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.