Re: load in a php page from javascript
- From: acord <acord@xxxxxxxxxxxxxxxxx>
- Date: Sun, 26 Feb 2006 01:29:54 +1100
Hywel Jenkins wrote:
In article <440064ae$1@xxxxxxxxxxxxxxxxxxxx>, acord@xxxxxxxxxxxxxxxxx says...It's always difficult (or impossible) to show the output of the php code, coz the output invoke other javascript libs. I found that if I use javascript (ajaxpage()) to load the php script into the div treemenu section, the php code will not call the javascript functions. But if I put the php codes inside the div treemneu section, the php code invoke the javascript functions (from the lib), then I can click the tree node of the menu.
acord wrote:
Hi,
In a html page, I don't know how to load in a php page from javascript. I've already defined a <div id="treemenu"> in the html page. The executed content from the php script is supposed loaded into the treemenu div. What is the best way to achieve this? I got error where the treemenu didn't close/open on the treenode, as when I clicked on the treenode, it said Object not found. But if I don't use ajaxpage() javascript function, and copy the content of the php script under the <div id="treemenu"> section, the treemenu works well.
Here is the javascript functions I m using to load a php script:
<snipped a load of rather badly written code />
So what? From the code you've posted how are we to determine what your PHP script outputs?
I suspect there is some sequential order when using javascript invoke the php script in a html file. In my example, I created html script, then defined a div treemenu, then load the php script at the end of the html script, eg:
<HTML>
....
<div id="treemenu">
</div>
<script language="JavaScript" type="text/javascript">
ajaxpage('treemenu.php', 'treemenu');
</script>
</HTML>
I created this file with php extention, (eg. test8.php).
I suspect this order is not right. I also tried .html file extention name, but still not help.
Thanks
A
.
- References:
- load in a php page from javascript
- From: acord
- Re: load in a php page from javascript
- From: acord
- Re: load in a php page from javascript
- From: Hywel Jenkins
- load in a php page from javascript
- Prev by Date: Re: load in a php page from javascript
- Next by Date: Re: load in a php page from javascript
- Previous by thread: Re: load in a php page from javascript
- Next by thread: Re: load in a php page from javascript
- Index(es):
Relevant Pages
|