Re: [Zope] Calling other frames
Hi Etienne, First of all, I don't think you can achieve that with javascript. As far as I know, neither IE nor Netscape allows javascript to access DOM objects of other frame page for security reasons. Therefore, to do it at backend is a good solution. Session is the thing you want. Unfortunately, zope doesn't have session management built in, but you can find a bunch of session management products in zope's download page. cheers Dirksen --- Etienne Labuschagne <etiennel@geospace.co.za> wrote:
Hi there
I have a navigation/sitemap object that shows the user where he is in the website at the current moment. I want this object eg. to sit in the left frame. This object must update every time the main (right) frame updates to reflect the position of the right frame. The website can be navigated both from this navigation/sitemap object or from links inside the website itself. Thus, the object must also update itself even if it is not used as the means to navigate the site.
How do I "talk" to objects in other frames? Or is there a better way to do this?
I know that this can probably be done with Javascript, but would prefer to use Zope as far as I can.
Thanks! Etienne
Tel: (012) 348 4586 Cel: 082 442 8981 Fax: (012) 361 8355
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
__________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
On Sun, Jan 14, 2001 at 11:16:44PM -0800, Dirksen wrote:
First of all, I don't think you can achieve that with javascript. As far as I know, neither IE nor Netscape allows javascript to access DOM objects of other frame page for security reasons.
This restriction only applies when the two frames come from different domains. Alll URLs from the same webserver can access DOM trees in other frames from the same server. This is how Zope updates the left-hand tree in the management interface when you add a Folder, for instance. For an example of updating navigation buttons across frames see http://www.tunix.nl/'. Ignore the Dutch, just choose an option on the main page, then use the top and left navigation buttons to go around a website. Then use your browser's back and forward buttons to see the left and top menus follow the current page. Also, when clicking on a link in the content pane, the navigation menus will update. All JavaScript source comments are in english, that's they way I worked. -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
I think probably Javascript is the 'cleanest' solution in this case, but depending on the complexity of your UI another non-JS approach is to make every link target the topmost frome (e.g., target="_top") and redraw all frames in the frameset on each 'click'. This way you know that all frames reflect the latest situation, but it can be annoying to see the whole browser redraw every time you do anything. However, if your browser doesn't *do* Javascript.... (so long as it does do frames.... hmm.. how likely is that?) then it would at least work.... -steve
"Martijn" == Martijn Pieters <mj@digicool.com> writes:
Martijn> On Sun, Jan 14, 2001 at 11:16:44PM -0800, Dirksen wrote: >> First of all, I don't think you can achieve that with >> javascript. As far as I know, neither IE nor Netscape allows >> javascript to access DOM objects of other frame page for >> security reasons. Martijn> This restriction only applies when the two frames come Martijn> from different domains. Alll URLs from the same webserver Martijn> can access DOM trees in other frames from the same Martijn> server. This is how Zope updates the left-hand tree in Martijn> the management interface when you add a Folder, for Martijn> instance. Martijn> For an example of updating navigation buttons across Martijn> frames see http://www.tunix.nl/'. Ignore the Dutch, just Martijn> choose an option on the main page, then use the top and Martijn> left navigation buttons to go around a website. Then use Martijn> your browser's back and forward buttons to see the left Martijn> and top menus follow the current page. Also, when Martijn> clicking on a link in the content pane, the navigation Martijn> menus will update. All JavaScript source comments are in Martijn> english, that's they way I worked. Martijn> -- Martijn Pieters | Software Engineer Martijn> mailto:mj@digicool.com | Digital Creations Martijn> http://www.digicool.com/ | Creators of Zope Martijn> http://www.zope.org/ Martijn> --------------------------------------------- Martijn> _______________________________________________ Zope Martijn> maillist - Zope@zope.org Martijn> http://lists.zope.org/mailman/listinfo/zope ** No cross Martijn> posts or HTML encoding! ** (Related lists - Martijn> http://lists.zope.org/mailman/listinfo/zope-announce Martijn> http://lists.zope.org/mailman/listinfo/zope-dev )
Hi, Could anyone tell me, if it is possible to upload a whole folder with all its including objekts like pictures and things into ZOPE? If yes, tell me how, please. And another question: a created my own zclass ( a newsitem). One instance of this newsitem has the same function like a folder. I can upload for example a file in it with the tag: <dtml-with News1> <dtml-call manage_addFile(... It works perfect :-) But I cannot insert something with the copy and paste functions in zope! If I try it, I get the message: The object 'file' does not support this operation. Perhaps someone is able to solve my probs ... Thanx, Marc
On Mon, 15 Jan 2001, Marc Fischer wrote:
Could anyone tell me, if it is possible to upload a whole folder with all its including objekts like pictures and things into ZOPE? If yes, tell me how, please.
There is load_site.py in Zope utilities directory, and there is newer version of it somewhere on zope.org - just search. Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
participants (5)
-
Dirksen -
Marc Fischer -
Martijn Pieters -
Oleg Broytmann -
Steve Spicklemire