Strange display with user5 - 8

  • rruiten
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
14 years 5 months ago #3387 by rruiten
Don't point to quickly to javascript on my site. I know i'm not flawless, i also know you're not ;) I've found the error, it's in your index.php code.

If you have a function that inserts a value (if exist) then be sure to put the delimiter on the correct side. :)

Original
Code:
BoxHeights.equalise(<?php if($showuser[5]) { ?>'c1',<?php } if($showuser[6]) { ?>'c2',<?php } if($showuser[7]) { ?>'c3'<? php } ?>);

Gives this error with only user5 and 6 occupied:
syntax error BoxHeights.equalise('c1','c2',);
Due to the extra delimiter at the end.

Corrected
Code:
BoxHeights.equalise(<?php if($showuser[5]) { ?>'c1'<?php } if($showuser[6]) { ?>,'c2'<?php } if($showuser[7]) { ?>,'c3'<?php } ?>);

Now it works like a charm.

Please Log in to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum