I am doing that on my homepage, the first time you click on a button, the
source is loaded from the server and executed, building the tree dynamically
depending on what the php script generated.
It works fine in IE/NS, still have problems with NS6 though, that I haven't
been able to look into yet.
It uses a loadpanel, like this:

You set one global variable for each code you want to load:

        var newsSrc=false

setup your loadpanel:

         lp = DynAPI.document.addChild(new LoadPanel());
                 var el = new EventListener();
                      el.onload = function(e) {
                            if(newsSrc)eval(newsSrc);newsSrc=false;
                       };
                 lp.addEventListener(el);

load the script like this:

        lp.setURL("files/news.html")

That's it.
In your file, in this case news.html you do this:

<Script language="Javascript" defer>
 newsSrc='newsDiv=new DynLayer("newsDiv",0,0,690,1200); '
 +'newsDiv.setHTML("'hello, hello'");'
+'scrollInfo = new CKSScrollBox(50,50,600,350,"black","beige");'
+'DynAPI.document.addChild(scrollInfo);'
+'scrollInfo.setContent(0,0,newsDiv)};'
</script>

That's all one long string, and don't forget the "defer" in the script tag.
And don't forget to include the files you need on your page.

see it working: www.richardinfo.com


Cheers,
Richard Bennett

[EMAIL PROTECTED]
www.richardinfo.com
(Everything running on, and ported to DynAPI2.53)
visit the DynAPI homepage (and FAQ) ::
http://dynapi.sourceforge.net/dynapi/index.php?menu=1
Browse (and search) the mailinglist here:
http://www.mail-archive.com/index.php3?hunt=dynapi


----- Original Message -----
From: "Joseph Bui" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 22 May, 2001 03:14
Subject: [Dynapi-Help] Update page without reloading


> Is it possible to update data on a page without reloading the page from
the
> server?
>
> This would be good for a dynamically loading tree control. When the page
> begins, the root of the tree is unexpanded, and no nodes are under the
root.
> When the user clicks to expand the root, the browser sends a request to
the
> server. The server sends back the data about all the children of the root.
> The browser creates new nodes, adds them to the tree and expands the root
> node.
>
> If you have frames, this can be done by submitting a form in a hidden
frame
> and having the HTML page response of the server contain a javascript which
> makes calls into the visible frame to create the new nodes.
>
> I would like to do this without frames because I read that setting images
> across frames doesn't always work in Netscape.
>
> -joe
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
>


_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to