PDA

View Full Version : Simple Tree Menu - Another issue



iperez_genius
09-03-2008, 02:14 AM
1) Script Title: Simple Tree Menu

2) Script URL (on DD): dont have one yet

3) Describe problem: The folders dont open and close, also the icons dont appear correctly.

I am generating the lists with php and here is the wierdest thing.

I copy the code from the http://www.dynamicdrive.com/dynamicindex1/navigate1.htm into an html page and the script work 100%.

I run my php generation script and copy the list structure into that same file and the menu works 100% BUT in my dynamic php file the menu doesn't work properly. The icons dont appear correctly..only the list.gif

Here is the web page after the php has been compiled


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Clinic Home</title>

<script type="text/javascript" src="simpletreemenu.js">

/***********************************************
* Simple Tree Menu- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

<link rel="stylesheet" type="text/css" href="simpletree.css" />
</head>

<body>

My Patients<br><a href="javascript:ddtreemenu.flatten('treemenu1', 'expand')">Expand All</a> | <a href="javascript:ddtreemenu.flatten('treemenu1', 'contact')">Contact All</a>

<ul id="treemenu1" class="treeview">


<li>16078 Evelyn 16078<ul><li><a class ="unread" href="pdf/97963_test.pdf">97963 test.pdf</a></li><li><a href="pdf/97964_test2.pdf">97964 test2.pdf</a></li></ul></li><li>16710 Jeanne 16710<ul><li><a class ="unread" href="pdf/97965_test3.pdf">97965 test3.pdf</a></li></ul></li></ul>
<script type="text/javascript">

//ddtreemenu.createTree(treeid, enablepersist, opt_persist_in_days (default is 1))

ddtreemenu.createTree("treemenu1", true)


</script>

</body>
</html>

Find attached a screen shot of what the outcome looks like

you will find that the html code actually work when placed in an html page by it seems that when generated by php it doesn't...any advice?


Ilan

codeexploiter
09-03-2008, 05:07 AM
Please post a link to your problematic page so that everyone can have a look at it.

iperez_genius
09-03-2008, 05:29 AM
Its not online...i have it on an offline server...

i have posted the html result of the php page...that should be enough unless there is some sort of problem with the code in firefox 3.0 which there isn't...

not sure what else to say.

ddadmin
09-03-2008, 05:52 AM
I've added some line breaks to your generated HTML for the list, for easier viewing:


<ul id="treemenu1" class="treeview">
<li>16078 Evelyn 16078<ul>
<li><a class ="unread" href="pdf/97963_test.pdf">97963 test.pdf</a></li>
<li><a href="pdf/97964_test2.pdf">97964 test2.pdf</a></li>
</ul>
</li>
<li>16710 Jeanne 16710<ul>
<li><a class ="unread" href="pdf/97965_test3.pdf">97965 test3.pdf</a></li>
</ul>
</li>
</ul>

Looking at it, everything appears in place. Unless there are other CSS styles on the same page that's interfering with something in simpletree.css, you'll need to post a link to at least a sample page so we can check out the problem live.

iperez_genius
09-03-2008, 06:09 AM
best i can do is attach the php page...
because i couldn't upload the php page i have saved it out as a text file...

ddadmin
09-03-2008, 06:32 AM
Hmm that won't help, since I can't run the attached file as a PHP page and see the actual output. Is the original HTML you posted above the actual full output of the rendered page?

iperez_genius
09-03-2008, 07:39 AM
yes,

all i have done is run the page, and copied the source from firefox to this forum...

ddadmin
09-04-2008, 04:25 AM
Well if the output is exactly as you've posted above, then it should work just fine. To confirm this, I saved that output onto a test page and ran it. It works properly.

http://i37.tinypic.com/21lintw.gif

iperez_genius
09-04-2008, 09:32 AM
i was afraid you were going to say that.

I am going to rebuild the page from scratch next week starting from the menu and then build into it the dynamic features...

I will keep you posted as to how i go...very wierd problem

Ilan

ddadmin
09-04-2008, 04:34 PM
There must be something else added onto your page when you actually serve it on your server that's causing the problem. Not much more I can say without looking at the actual, dynamically generated page. :)