RE: Content loading
"Christian Boulanger" <[email protected]>
| Newsgroups | gmane.comp.windows.devel.netwindows |
|---|---|
| Message-ID | <000701c3605f$4db60540$0200a8c0@Laptop> |
Alex,
> netWindows provides an entire infrastructure for loading
> external content into page elements (including windows). The loaded pages
must
> include a callback script, located in winScripts/load_page_callback.js.
They do
> not need to preform any calls to methods defined in that script, as the
> callback setup is automatic.
> To request that a URL be loaded into a window, you can do
> something like:
> windowObj.contentObj.loadURL("http://wherever.com/something.html");
I understand that this seems to be the preferred way of displaying content
in widgets. But what if I want to avoid server traffic and load a large
initial dataset in a (hidden) frame, to work with it with JavaScript.
I want to do the following:
1) load the data into one location.
How can I then access it? How are you doing it?
- load Data from DOM_nodes?
- Include JavaScript Arrays generated automatically by the server(for
example, by a PHP-Array-to-JavaScript-Array conversion? Then how do access
and run this Javascript? That's what I have done, rather arckwardly, by
eval( document.getElementById.data(name).firstchild,data), but couldn't the
javascript not be executed on load?
- Your __data__ function...
- ...
2) Then I want to open a window and write content, like a table or form,
into it.
- how do I access the content node of, for example, the Window widget and
write to it as I can with document.write()..
Thanks for the Info,
Christian
>
> There are several gotchas regarding loaded content. The first
> is that scripts
> and CSS includes defined in the <head> section of the loaded
> content will be
> essentially ignored.
>
> A skeleton for a page loaded by this mechanism is available
> in the FAQ
> (http://netwindows.org/docs/FAQ.html#d45e860), but looks like:
>
> <!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" xml:lang="en" lang="en">
> <head>
> <title>This is loadable in netWindows</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1" />
> <script
>
> src="http://netWindows.org/winScripts/load_page_callback.js"
> language="JavaScript"
> type="text/javascript"></script>
> </head>
> <body>
> <!-- YOUR PAGE CONTENT HERE -->
> </body>
> </html>
>
> > ... And of course what the new syntax is for setting up the main
> > window, so that the transparency problem can be removed
> with the CVS
> > code.
>
> I'm not sure I understand this problem. Can you clarify?
>
> --
> Alex Russell
> [email protected]
> [email protected]
>
> _______________________________________________
> The netWindows developers list: [email protected]
> http://netwindows.org/mailman/listinfo/devel_netwindows.org
>
_______________________________________________
The netWindows developers list: [email protected]
http://netwindows.org/mailman/listinfo/devel_netwindows.org