[Chameleon] Re: EMBEDDED (revisited)

bartvde at xs4all.nl bartvde at xs4all.nl
Thu Jun 3 09:08:44 EDT 2004


Hi Aaron,

I don't see any reason why this would not be possible for the Locate widget.

Can you try and alert the src of the iframe with javascript at the end of
the OnLoad function? Are the $gszSessId$ etc. values filled in by the
application? Are you passing all the necessary parameters for the Locate
widget? And are you using Chameleon 1.99?

Best regards,
Bart

> Is it possible to do this for the locate widget?  I tried to do this using
> what you have provided, but all i get is a blank page?
>
> Aaron Griffin
>
> ----- Original Message -----
> From: "Bart van den Eijnden" <bartvde at xs4all.nl>
> To: <chameleon at lists.maptools.org>
> Sent: Wednesday, June 02, 2004 2:18 PM
> Subject: Re: [Chameleon] Re: EMBEDDED (revisited)
>
>
>> Final update on this one, if anybody in future wants to try this
>> approach
>> for embedding popup widgets:
>>
>> 1) I named my form (<form name="blabla">) and made all references in the
>> popup refer to this named form (instead of document.forms[0])
>>
>> 2) I added the following to my application index.phtml just before the
>> CWCExecute call:
>>
>> $oApp->setVar( 'gszCoreWebPath', $_SESSION['gszCoreWebPath'] );
>> $oApp->setVar( 'gszSessId', $GLOBALS['gszSessId'] );
>>
>> 3) I added an iframe to my HTML template:
>>
>> <iframe frameborder="0" id="catalogframe" scrolling="No" width="600px"
>> height="450px" ></iframe>
>>
>> 4) I set the src of the iframe at the end of the OnLoad function (of the
>> body in the HTML template), because otherwise the session is locked:
>>
>> document.getElementById("catalogframe"). src =
>>
> "[$gszCoreWebPath$]/widgets/GeoservicesCatalogSearch/CatalogSearchPopup.phtm
> l?szCallbackFunc=catalogSearchCB&szWcasURL=http://grosserver:8080/deegreewca
> s/wcas&iMaxRecords=10&sid=[$gszSessId$]&bEmbedded=1";
>>
>> 5) I also had to add the callback function to my template.
>>
>> 6) finally I implemented a widget attribute called EMBEDDED which will
>> determine the state of the widget, e.g. when it is embedded I cannot use
>> "opener" in js, but I have to use "parent". Also the close button is not
>> very functional in the EMBEDDED mode, so I made this depend on the state
>> as well.
>>
>> Conclusion: it seemed simpler than it turned out to be :)
>>
>> Best regards,
>> Bart
>>
>> On Wed, 2 Jun 2004 10:40:26 +0200 (CEST), <bartvde at xs4all.nl> wrote:
>>
>> > Found it, or at least think I found it :)
>> >
>> > The popup was using a lot of document.forms[0] statements, and
>> ofcourse
>> > this is now referring to the main form in the template, i.e. to the
> wrong
>> > form.
>> >
>> > I will change all this to {$this->mszHTMLForm}. Do I need to set
> anything
>> > else Paul?
>> >
>> > Best regards,
>> > Bart
>> >
>> >> Hi Paul,
>> >>
>> >> We started trying the iframe option today but ran into some trouble
>> for
>> >> which we cannot find the cause.
>> >>
>> >> This is the iframe we use in the HTML template:
>> >> <iframe frameborder="0" id="treeview" scrolling="No" width="330px"
>> >> height="335px"
>> >>
> src="[$gszCoreWebPath$]/widgets/GeoservicesCatalogSearch/CatalogSearchPopup.
> phtml?szCallbackFunc=catalogSearchCB&szWcasURL=http://grosserver:8080/deegre
> ewcas/wcas&iMaxRecords=10&<?php
>> >> echo SID; ?>/>" ></iframe>
>> >>
>> >> E
> verything is loaded probably (except css and buttonized buttons), but
>> >> all
>> >> things in the popup which use the session are empty strings (the
>> popup
>> >> includes the session.inc though), e.g.:
>> >>
>> >> <script language="JavaScript" src="<?php echo
>> >> $_SESSION['gszCoreWebPath'];
>> >> ?>/widgets/js/cwc_dhtml.js"></script>
>> >>
>> >> is resolved into:
>> >>
>> >> <script language="JavaScript"
>> src="/widgets/js/cwc_dhtml.js"></script>
>> >>
>> >> I hope you have some idea on what is causing this?
>> >>
>> >> Thanks in advance.
>> >>
>> >> Best regards,
>> >> Bart
>> >>
>> >
>> > _______________________________________________
>> > Chameleon mailing list
>> > Chameleon at lists.maptools.org
>> > http://lists.maptools.org/mailman/listinfo/chameleon
>> >
>>
>>
>>
>> --
>>
>> _______________________________________________
>> Chameleon mailing list
>> Chameleon at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/chameleon
>>
>



More information about the Chameleon mailing list