Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sothink Tree menu prob


Incubus

Recommended Posts

Hi :rolleyes::)

Im trying to use a nicer looking dynamic tree menu in place of the default catergories one

but i get very strange results when i do.

The new menu looks an works fine but it seems to upset the sizes off all the boxes under it

and the positions of al the others.

um using a modified version of the graphical boxes cont

 

 

heres how i tryed to pop it in

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

 new infoBoxHeading($info_box_contents, true, false);

 $categories_string = '<script type="text/javascript" src="script/stlib.js"></script>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
             <tr>
               <td align="center" class="infoBoxContents"><div>
<script type="text/javascript">
<!-- my java for menu is here //-->
</script></div></td></tr></table>';

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

 new infoBox($info_box_contents);

?>
         </td>
    </tr>


<!-- New Categories_Eof //--> 

 

u can see what happens here "http://img132.imageshack.us/img132/3443/whatwentwrongag6.jpg"

 

i tryed enclosing it in a table and div but still the same resutls

obviously the menus java upsets the other tables some how

 

but barely understanding php and html and not knowing even less about java im having no hope working it out.

Link to comment
Share on other sites

The closest I can come to duplicating that look is to alter my source by removing the <td... below:

 

<!-- body_text //-->
<td valign="top" width="100%">

Although the part it doesn't duplicate is make the 3 boxes grow wider, it just duplicates the positions of the boxes.

 

And this has nothing to do with the left column....

:blush:

 

I understand the pro's and con's of posting your URL, but I seriously doubt anyone can give you a "magic bullet" without looking at your HTML source in it's entirety.

 

And that means they'll need your URL....

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

thanks

oops yes of course i didnt post a url as i had it pass protected until it was all ready to go

just in case some one stumbles across it and starts ordering things.

 

 

its www.harddrivenpc.com.au

 

also there is only 1 menu item with a working link as im not bothering to add the rest till it all works.

Link to comment
Share on other sites

OK.

 

Using the Web Developer plugin in Firefox, here's what I had to do to get things to fly right....

 

Change this code:

 

<!-- left_navigation //-->

</table><table border="0" cellpadding="0" cellspacing="0" width="100%">

to

<!-- left_navigation //-->

<!-- menufix
</table><table border="0" cellpadding="0" cellspacing="0" width="100%">
//-->

Change this

 

</table>

<!-- New Categories_Eof //-->

to

<!--  menu fix
</table>
//-->

<!-- New Categories_Eof //-->

Change this code:

 

		  </tr>

<!-- information_eof //-->
<!-- left_navigation_eof //-->
</table>
<!-- body_text //-->

to

 

<!--   menufix
	  </tr>
//-->
<!-- information_eof //-->
<!-- left_navigation_eof //-->
</table>
<!-- body_text //-->
<!-- menufix added next line //-->
<td valign="top" width="100%">

Change this code:

 

<!-- body_text_eof //-->

<table border="0" cellpadding="2" cellspacing="0" width="125">
<!-- right_navigation //-->

to

<!-- body_text_eof //-->

<!-- menufux added next line//-->
<td valign="top">

<table border="0" cellpadding="2" cellspacing="0" width="125">
<!-- right_navigation //-->

Sometimes what works in Firefox doesn't work in IE, but I don't have a "real time" tool to debug in the IE environment.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

No.

 

These would be changes in the index.php file in your root folder.

 

It's always a good idea to make a backup of any file before making any edits.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

No.

 

These would be changes in the index.php file in your root folder.

 

It's always a good idea to make a backup of any file before making any edits.

 

some of that code isnt in the index.php only in the generated html

 

The realy strange thing is the only differnce between the original catergories box and the new 1 is the Infobox contents.

 

Even if i use a different box as a starting template i get the same results

 

or just have the $categories_string = 'some test text'; for instance same results.

The original php to build the catergories string for the info box contents must be adding somthing im not.

Link to comment
Share on other sites

Now i feel realy silly :blink: seems i left out somthing important!

 

// oops i for got to add this! 
?>
<!-- categories //-->
         <tr>
           <td>
<?php
// lol no wonder things went wrong !

$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES2);
new infoBoxHeading($info_box_contents, true, false);
$categories_string = '<script type="text/javascript" src="script/stlib.js"></script>
<script type="text/javascript">
<!-- my java for menu is here //--></script>';
$info_box_contents = array();
 $info_box_contents[] = array('text' => $categories_string);
 new infoBox($info_box_contents);
    ?>          </td>     </tr>

 

lol it all seems to work fine now!

 

Thanks for your help Jim i would still be here tommorow trying to track it down :D

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...