Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: DB Access with build_hierarchy problem
schwarzer11
Junior Member

Posts: 2
Registered: 3/13/2008
Location: Germany
Member Is Offline
posted on 3/13/2008 at 04:27 PM Reply With Quote
DB Access with build_hierarchy problem


Hi,

when I inserted:
<script language="JavaScript">
<?build_hierarchy_var('localhost:8501', 'root', '', 'First_PDM', 'tx_pdmtest_hparts_parent_mm', 'TREE_ITEMS', 'uid_local', 'uid_foreign', 'uid_local', '');?>
</script>
into my Header i got the following error message:
"invalid XML markup". How can this be? I tried with a static TREE_ITEMS file and everything works just perfekt. Also the DB Access for itself works just fine, just the Line inserted into the header seems to mess things up.
Does anyone have an idea what i'm doing wrong??

Thanx in advance
Marco
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 3/14/2008 at 02:53 PM Reply With Quote

There is no XML involved in the generating of the tree items. The error message probably refers to the HTML of the page which is sort of XML. Look at the source of the page and google the error message together with the name of the server side system you're using.
View User's Profile View All Posts By User U2U Member
schwarzer11
Junior Member

Posts: 2
Registered: 3/13/2008
Location: Germany
Member Is Offline
posted on 3/14/2008 at 05:18 PM Reply With Quote

I'm using TYPO3 and there is no Problem on this end. The page looks like this:

<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<!--
This website is powered by TYPO3 - inspiring people to share!
-->

<link rel="stylesheet" type="text/css" href="fileadmin/styles/my_style.css" />
<script type="text/javascript" src="fileadmin/tmenu/tree.js" language="JavaScript"></script>
<script type="text/javascript" src="fileadmin/tmenu/tree_tpl.js" language="JavaScript"></script>
<script language="JavaScript"><?build_hierarchy_var('localhost:8501', 'root', '', 'First_PDM', 'tx_pdmtest_hparts_parent_mm', 'TREE_ITEMS', 'uid_local', 'uid_foreign', 'tablenames', 'sorting');?></script>

<title>FTS 2</title>

<meta name="generator" content="TYPO3 4.1 CMS" />
<script type="text/javascript" src="typo3temp/javascript_757c080409.js"></script>


</head>
<body>
....

<div><script language="JavaScript">

new tree (TREE_ITEMS, TREE_TPL);

</script></div>

I still get the error message about the "invalid XML markup" in line: <?build_hierarchy_var('localhost:8501', 'root', '', 'First_PDM', 'tx_pdmtest_hparts_parent_mm', 'TREE_ITEMS', 'uid_local', 'uid_foreign', 'tablenames', 'sorting');?>

and therefore the next error, that "TREE_ITEMS is not defined" (because it wasn't created by build_hierarchy).
How does this work anyways. How does the "build_hierarchy" funciton pass on the TREE_ITEMS variable. in static mode it gets the items from the file, but now...?

Thanks for any help
Marco
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 4/14/2008 at 03:30 PM Reply With Quote

is this all inside the php file?

try replacing <? build_hierarchy_var( ... ?>
with say <? echo "/* test */" ?>

you'll surely get client side "TREE_ITEMS is not defined" error, but there should be no errors regarding XML
If you still get one then it means that the code is not being handled as php (it's probably fed to some CMS as template). You'll have to talk to CMS people to find out how to use custom php code there.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Multiple Trees
Frames Targeting
Icons and Styles Overloading
Event Handling
Performance Test
Version 1.2 features
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004