You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Arun Kumar <ar...@gmail.com> on 2008/03/09 11:57:34 UTC

Dynamic height

I have created an XML file that uses Content type="url" and it refers to a
PHP page and in that page I wrote

    echo "<script language='JavaScript' src='http://localhost:8080" .
$_GET['libs'] ."' ></script>";
    echo "<script language='JavaScript'
type='text/javascript'>alert(_IG_AdjustIFrameHeight)</script>";

Then I got alert, so the required js files are included in the PHP page.

At the end of page,

    echo "<script language='JavaScript' type='text/javascript'>";
    echo "_IG_AdjustIFrameHeight();";
    echo "</script>";

In adjustHeight method, I kept an alert. so a call is made to
_IG_AdjustIFrameHeight(). But the iFrame height is not getting adjusted in
IE or mozilla. In  Opera, iFrame height is changed properly.

When I use the _IG_AdjustIFrameHeight(); in XML file that contains Content
type="html", it is working in IE also.

Why it is not working in IE and mozilla?

If rpc is not going to support, then to which ifpc function it is going to
make a call?

Re: Dynamic height

Posted by Kevin Brown <et...@google.com>.
On Tue, Mar 11, 2008 at 10:21 AM, Michael Mahemoff <li...@mahemoff.com>
wrote:

> Bruno Bowden wrote:
> > Loading a single script file with the aggregated contents is much better
> > performance than loading multiple files as only a single network fetch
> is
> > needed.
>
> Not necessarily. If JS files are cached, separate downloads *might* be
> more efficient.


Correct, which is why shindig attempts to choose a sensible set of files as
much as possible, and puts other things inline. Take a look at
gadgets/http/GadgetRenderer.java for details.



-- 
~Kevin

Re: Dynamic height

Posted by Bruno Bowden <br...@google.com>.
True indeed.

On Tue, Mar 11, 2008 at 9:21 AM, Michael Mahemoff <li...@mahemoff.com>
wrote:

> Bruno Bowden wrote:
> > Loading a single script file with the aggregated contents is much better
> > performance than loading multiple files as only a single network fetch
> is
> > needed.
>
> Not necessarily. If JS files are cached, separate downloads *might* be
> more efficient.
>

Re: Dynamic height

Posted by Michael Mahemoff <li...@mahemoff.com>.
Bruno Bowden wrote:
> Loading a single script file with the aggregated contents is much better
> performance than loading multiple files as only a single network fetch is
> needed.

Not necessarily. If JS files are cached, separate downloads *might* be 
more efficient.

Re: Dynamic height

Posted by Bruno Bowden <br...@google.com>.
Loading a single script file with the aggregated contents is much better
performance than loading multiple files as only a single network fetch is
needed.

On Tue, Mar 11, 2008 at 3:09 AM, Akash Xavier <ak...@gmail.com>
wrote:

> oh.... thats a nice idea.
>
> On Tue, Mar 11, 2008 at 2:02 AM, Kevin Brown <et...@google.com> wrote:
>
> > On Tue, Mar 11, 2008 at 2:59 AM, Akash Xavier <ak...@gmail.com>
> > wrote:
> >
> > > Kevin,
> > > What u said is the best idea for core features.
> > > for plugins/optional features ...  it increases the file size...
> > shouldn't
> > > there be different files for different optional features?
> > > Like one for dynamic-height, one for tabs, etc ? and so that the app
> can
> > > request whatever it actually needs.
> >
> >
> > The libs parameter is automatically calculated by the server to include
> > only
> > what the gadget in question actually uses. It generally chooses the most
> > optimal bundling available.
> >
>
>
>
> --
> Akash Xavier
> akashmanohar@gmail.com
>

Re: Dynamic height

Posted by Akash Xavier <ak...@gmail.com>.
oh.... thats a nice idea.

On Tue, Mar 11, 2008 at 2:02 AM, Kevin Brown <et...@google.com> wrote:

> On Tue, Mar 11, 2008 at 2:59 AM, Akash Xavier <ak...@gmail.com>
> wrote:
>
> > Kevin,
> > What u said is the best idea for core features.
> > for plugins/optional features ...  it increases the file size...
> shouldn't
> > there be different files for different optional features?
> > Like one for dynamic-height, one for tabs, etc ? and so that the app can
> > request whatever it actually needs.
>
>
> The libs parameter is automatically calculated by the server to include
> only
> what the gadget in question actually uses. It generally chooses the most
> optimal bundling available.
>



-- 
Akash Xavier
akashmanohar@gmail.com

Re: Dynamic height

Posted by Kevin Brown <et...@google.com>.
On Tue, Mar 11, 2008 at 2:59 AM, Akash Xavier <ak...@gmail.com>
wrote:

> Kevin,
> What u said is the best idea for core features.
> for plugins/optional features ...  it increases the file size... shouldn't
> there be different files for different optional features?
> Like one for dynamic-height, one for tabs, etc ? and so that the app can
> request whatever it actually needs.


The libs parameter is automatically calculated by the server to include only
what the gadget in question actually uses. It generally chooses the most
optimal bundling available.

Re: Dynamic height

Posted by Akash Xavier <ak...@gmail.com>.
Kevin,
What u said is the best idea for core features.
for plugins/optional features ...  it increases the file size... shouldn't
there be different files for different optional features?
Like one for dynamic-height, one for tabs, etc ? and so that the app can
request whatever it actually needs.

On Tue, Mar 11, 2008 at 1:55 AM, Kevin Brown <et...@google.com> wrote:

> On Tue, Mar 11, 2008 at 2:43 AM, Akash Xavier <ak...@gmail.com>
> wrote:
>
> > Neo,
> > Forget abt type=url for a while. Its not supported yet.
> >
> > Kevin,
> > I was just wondering why I was getting so many mails regarding
> > dynamic-height. U answered it. And now I know that it was all from one
> > person. I think we should make it a point to mention the fact that "we
> > don't
> > support type=url gadgets yet" or some sorta statement be displayed on
> the
> > Apache Shindig site and also in the TODO/Readme file.
> >
> > Arun,
> > Even if type url is supported, the below statement is wrong:
> > echo "<script language='JavaScript' src='http://localhost:8080" .
> > $_GET['libs'] ."' ></script>";
> >
> > You cant import a whole lot of javascript files using one <script> tag.
> U
> > need one <script> tag for every file. So maybe might have to split
> > $_GET['libs']  into separate strings(to get feature names) and then
> import
> > the files from the server with <script> tags.
>
>
> That's not necessarily true; the libs parameter will usually just point to
> a
> single file with aggregated script contents.
>



-- 
Akash Xavier
akashmanohar@gmail.com

Re: Dynamic height

Posted by Kevin Brown <et...@google.com>.
On Tue, Mar 11, 2008 at 2:43 AM, Akash Xavier <ak...@gmail.com>
wrote:

> Neo,
> Forget abt type=url for a while. Its not supported yet.
>
> Kevin,
> I was just wondering why I was getting so many mails regarding
> dynamic-height. U answered it. And now I know that it was all from one
> person. I think we should make it a point to mention the fact that "we
> don't
> support type=url gadgets yet" or some sorta statement be displayed on the
> Apache Shindig site and also in the TODO/Readme file.
>
> Arun,
> Even if type url is supported, the below statement is wrong:
> echo "<script language='JavaScript' src='http://localhost:8080" .
> $_GET['libs'] ."' ></script>";
>
> You cant import a whole lot of javascript files using one <script> tag. U
> need one <script> tag for every file. So maybe might have to split
> $_GET['libs']  into separate strings(to get feature names) and then import
> the files from the server with <script> tags.


That's not necessarily true; the libs parameter will usually just point to a
single file with aggregated script contents.

Re: Dynamic height

Posted by Akash Xavier <ak...@gmail.com>.
Neo,
Forget abt type=url for a while. Its not supported yet.

Kevin,
I was just wondering why I was getting so many mails regarding
dynamic-height. U answered it. And now I know that it was all from one
person. I think we should make it a point to mention the fact that "we don't
support type=url gadgets yet" or some sorta statement be displayed on the
Apache Shindig site and also in the TODO/Readme file.

Arun,
Even if type url is supported, the below statement is wrong:
echo "<script language='JavaScript' src='http://localhost:8080" .
$_GET['libs'] ."' ></script>";

You cant import a whole lot of javascript files using one <script> tag. U
need one <script> tag for every file. So maybe might have to split
$_GET['libs']  into separate strings(to get feature names) and then import
the files from the server with <script> tags.

And for now: type=url is not supported as Kevin said. Wait for a while and
you will make hay or else u will mess up if you try to do stuff the wrong
way. Just my 2 cents  :)

On Tue, Mar 11, 2008 at 1:16 AM, Neo Anderson <ne...@googlemail.com>
wrote:

> But he is saying that he is getting the JavaScript required for settitle
> and
> dynamicheight in his (as he used the script tag) page.
>
> On 3/11/08, Kevin Brown <et...@google.com> wrote:
> >
> > Arun,
> >
> > You've asked this question before (several times, in fact). type=url is
> > not
> > supported yet. When it is supported, you'll be the first person to know.
> > Nobody on this list is going to be able to help you make type=url work
> > because type=url is not supported. We will most likely not be able to
> > support type=url until the RESTful APIs have been implemented.
> >
> > On Sun, Mar 9, 2008 at 3:57 AM, Arun Kumar <
> > arunkumar.boppudi.514@gmail.com>
> > wrote:
> >
> > > I have created an XML file that uses Content type="url" and it refers
> to
> > a
> > > PHP page and in that page I wrote
> > >
> > >    echo "<script language='JavaScript' src='http://localhost:8080" .
> > > $_GET['libs'] ."' ></script>";
> > >    echo "<script language='JavaScript'
> > > type='text/javascript'>alert(_IG_AdjustIFrameHeight)</script>";
> > >
> > > Then I got alert, so the required js files are included in the PHP
> page.
> > >
> > > At the end of page,
> > >
> > >    echo "<script language='JavaScript' type='text/javascript'>";
> > >    echo "_IG_AdjustIFrameHeight();";
> > >    echo "</script>";
> > >
> > > In adjustHeight method, I kept an alert. so a call is made to
> > > _IG_AdjustIFrameHeight(). But the iFrame height is not getting
> adjusted
> > in
> > > IE or mozilla. In  Opera, iFrame height is changed properly.
> > >
> > > When I use the _IG_AdjustIFrameHeight(); in XML file that contains
> > Content
> > > type="html", it is working in IE also.
> > >
> > > Why it is not working in IE and mozilla?
> > >
> > > If rpc is not going to support, then to which ifpc function it is
> going
> > to
> > > make a call?
> > >
> >
> >
> >
> > --
> > ~Kevin
> >
>



-- 
Akash Xavier
akashmanohar@gmail.com

Re: Dynamic height

Posted by Neo Anderson <ne...@googlemail.com>.
But he is saying that he is getting the JavaScript required for settitle and
dynamicheight in his (as he used the script tag) page.

On 3/11/08, Kevin Brown <et...@google.com> wrote:
>
> Arun,
>
> You've asked this question before (several times, in fact). type=url is
> not
> supported yet. When it is supported, you'll be the first person to know.
> Nobody on this list is going to be able to help you make type=url work
> because type=url is not supported. We will most likely not be able to
> support type=url until the RESTful APIs have been implemented.
>
> On Sun, Mar 9, 2008 at 3:57 AM, Arun Kumar <
> arunkumar.boppudi.514@gmail.com>
> wrote:
>
> > I have created an XML file that uses Content type="url" and it refers to
> a
> > PHP page and in that page I wrote
> >
> >    echo "<script language='JavaScript' src='http://localhost:8080" .
> > $_GET['libs'] ."' ></script>";
> >    echo "<script language='JavaScript'
> > type='text/javascript'>alert(_IG_AdjustIFrameHeight)</script>";
> >
> > Then I got alert, so the required js files are included in the PHP page.
> >
> > At the end of page,
> >
> >    echo "<script language='JavaScript' type='text/javascript'>";
> >    echo "_IG_AdjustIFrameHeight();";
> >    echo "</script>";
> >
> > In adjustHeight method, I kept an alert. so a call is made to
> > _IG_AdjustIFrameHeight(). But the iFrame height is not getting adjusted
> in
> > IE or mozilla. In  Opera, iFrame height is changed properly.
> >
> > When I use the _IG_AdjustIFrameHeight(); in XML file that contains
> Content
> > type="html", it is working in IE also.
> >
> > Why it is not working in IE and mozilla?
> >
> > If rpc is not going to support, then to which ifpc function it is going
> to
> > make a call?
> >
>
>
>
> --
> ~Kevin
>

Re: Dynamic height

Posted by Kevin Brown <et...@google.com>.
Arun,

You've asked this question before (several times, in fact). type=url is not
supported yet. When it is supported, you'll be the first person to know.
Nobody on this list is going to be able to help you make type=url work
because type=url is not supported. We will most likely not be able to
support type=url until the RESTful APIs have been implemented.

On Sun, Mar 9, 2008 at 3:57 AM, Arun Kumar <ar...@gmail.com>
wrote:

> I have created an XML file that uses Content type="url" and it refers to a
> PHP page and in that page I wrote
>
>    echo "<script language='JavaScript' src='http://localhost:8080" .
> $_GET['libs'] ."' ></script>";
>    echo "<script language='JavaScript'
> type='text/javascript'>alert(_IG_AdjustIFrameHeight)</script>";
>
> Then I got alert, so the required js files are included in the PHP page.
>
> At the end of page,
>
>    echo "<script language='JavaScript' type='text/javascript'>";
>    echo "_IG_AdjustIFrameHeight();";
>    echo "</script>";
>
> In adjustHeight method, I kept an alert. so a call is made to
> _IG_AdjustIFrameHeight(). But the iFrame height is not getting adjusted in
> IE or mozilla. In  Opera, iFrame height is changed properly.
>
> When I use the _IG_AdjustIFrameHeight(); in XML file that contains Content
> type="html", it is working in IE also.
>
> Why it is not working in IE and mozilla?
>
> If rpc is not going to support, then to which ifpc function it is going to
> make a call?
>



-- 
~Kevin

Re: Dynamic height

Posted by Neo Anderson <ne...@googlemail.com>.
But if I use other XML file that has Conetent type="html", then it is
working fine.
Just content type is changing. Nothing else.


On 3/11/08, Zhen Wang <zh...@apache.org> wrote:
>
> This usually happens when the relay file does not exist, or the relay
> URL is not passed to gadgets correctly.
>
> It works in Opera because Opera supports document.postMessage which is
> taken advantage of by the rpc library to make cross-domain calls.
>
>
> On Sun, Mar 9, 2008 at 3:57 AM, Arun Kumar
> <ar...@gmail.com> wrote:
> > I have created an XML file that uses Content type="url" and it refers to
> a
> >  PHP page and in that page I wrote
> >
> >     echo "<script language='JavaScript' src='http://localhost:8080" .
> >  $_GET['libs'] ."' ></script>";
> >     echo "<script language='JavaScript'
> >  type='text/javascript'>alert(_IG_AdjustIFrameHeight)</script>";
> >
> >  Then I got alert, so the required js files are included in the PHP
> page.
> >
> >  At the end of page,
> >
> >     echo "<script language='JavaScript' type='text/javascript'>";
> >     echo "_IG_AdjustIFrameHeight();";
> >     echo "</script>";
> >
> >  In adjustHeight method, I kept an alert. so a call is made to
> >  _IG_AdjustIFrameHeight(). But the iFrame height is not getting adjusted
> in
> >  IE or mozilla. In  Opera, iFrame height is changed properly.
> >
> >  When I use the _IG_AdjustIFrameHeight(); in XML file that contains
> Content
> >  type="html", it is working in IE also.
> >
> >  Why it is not working in IE and mozilla?
> >
> >  If rpc is not going to support, then to which ifpc function it is going
> to
> >  make a call?
> >
>

Re: Dynamic height

Posted by Zhen Wang <zh...@apache.org>.
This usually happens when the relay file does not exist, or the relay
URL is not passed to gadgets correctly.

It works in Opera because Opera supports document.postMessage which is
taken advantage of by the rpc library to make cross-domain calls.

On Sun, Mar 9, 2008 at 3:57 AM, Arun Kumar
<ar...@gmail.com> wrote:
> I have created an XML file that uses Content type="url" and it refers to a
>  PHP page and in that page I wrote
>
>     echo "<script language='JavaScript' src='http://localhost:8080" .
>  $_GET['libs'] ."' ></script>";
>     echo "<script language='JavaScript'
>  type='text/javascript'>alert(_IG_AdjustIFrameHeight)</script>";
>
>  Then I got alert, so the required js files are included in the PHP page.
>
>  At the end of page,
>
>     echo "<script language='JavaScript' type='text/javascript'>";
>     echo "_IG_AdjustIFrameHeight();";
>     echo "</script>";
>
>  In adjustHeight method, I kept an alert. so a call is made to
>  _IG_AdjustIFrameHeight(). But the iFrame height is not getting adjusted in
>  IE or mozilla. In  Opera, iFrame height is changed properly.
>
>  When I use the _IG_AdjustIFrameHeight(); in XML file that contains Content
>  type="html", it is working in IE also.
>
>  Why it is not working in IE and mozilla?
>
>  If rpc is not going to support, then to which ifpc function it is going to
>  make a call?
>