SHANX6336 Posted May 20, 2004 Posted May 20, 2004 Hey everybody, Here is my situation... I am building DHTML menus that use JavaScript. I need to place one line of JavaScript code into the <HEAD> and one in the <BODY> where I want the menu to appear. Here is the problem, when I place the code into the column_left.php file, the body text and the column_right.php skip down. The menu appears, but everything to the right goes down below the menu, almost as if the column_left.php is taking up 100% across the screen. The menu is only 160 pixels across. What can I do? If I place a 160 pixel image in the column_left.php file the body becomes smaller, but stays in the middle with the right column to the right, so it has something to do with the use of JavaScript in the column_left.php file.
241 Posted May 21, 2004 Posted May 21, 2004 what code have you placed in the column as I use javascript in the manufactures box in the left column without affecting the main body or tight column. No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
SHANX6336 Posted May 22, 2004 Author Posted May 22, 2004 Thank you for responding. Here is the code I place in column_left.php: <script type="text/javascript" language="JavaScript1.2" src="/scripts_dhtml/menus.js"></script> Once I do that, everything skips down. If I place anything else with the same dimensions, everything stays in their proper place. Any ideas? :)
SHANX6336 Posted May 23, 2004 Author Posted May 23, 2004 I'd really appreciate it if someone can take a look at this for me or if I can be sent over some advice by someone trying to incorporate javascript into their templates. Thanks!
241 Posted May 23, 2004 Posted May 23, 2004 is the code placed between <td> or <div> tags No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
SHANX6336 Posted May 23, 2004 Author Posted May 23, 2004 I have tried making a table surrounding it with the correct width, but it doesn't help. So yes, I have used <td> but not <div> I'm going to play around with it and see if it helps with <div>. Does it make a difference if I use them or not? In my index.php and all other main PHP files the left column is supposed to be in a <td> though.
SHANX6336 Posted May 24, 2004 Author Posted May 24, 2004 Here is the link of the page I am working on so everyone can see my struggle :angry: http://www.eopticalnerve.com/catalog/index.php
SHANX6336 Posted May 24, 2004 Author Posted May 24, 2004 When my column_left.php has the following, there are no problems. The image appears on the left with nothing under it, with the main center body in the middle, and the column_right.php as usual: <img src="/images/trans.gif" width=1 height=10 border=0 alt=""><br> <img src="/images/m2_browseourcatalog.gif" width=160 height=20 border=0 alt="Browse Our Catalog"><br> Once I add the script to it, as below, all the columns become disarrayed and the body goes below and the column_right.php column goes below that: <img src="/images/trans.gif" width=1 height=10 border=0 alt=""><br> <img src="/images/m2_browseourcatalog.gif" width=160 height=20 border=0 alt="Browse Our Catalog"><br> <script type="text/javascript" language="JavaScript1.2" src="/scripts/menu.js"></script><br> <script type="text/javascript" language="JavaScript1.2" src="/scripts/menu2.js"></script><br> It's a very odd problem I'm having. I've never struggled with something this much without getting it right.
SHANX6336 Posted May 24, 2004 Author Posted May 24, 2004 SOLVED! After staring at my index.php file long enough I realized I can separate the content of column_left.php with <tr><td>. I tried it and it aligned everything properly. I wouldn't have even looked if it wasn't for your replies. Thank you for your assistance! I really appreciate having the support of the osCommerce community!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.