Matthew, if I try the below code, the scroll bar is not appearing. Here is my
exact code:
<![CDATA[
<script type="text/javascript">
function changeTitle(form) {
var title='karthi';
gadgets.window.setTitle(title);
alert('hi');
}
</script>
<DIV style="height: 150px; overflow: auto;">
<INPUT TYPE="button" NAME="button" Value="Change Title"
onClick="changeTitle(this.form)">
<a href="http://www.yahoo.com">
<b><i>Hello Yahoo</i></b>
</a>
This is Gadget2
</DIV>
]]>
Thanks,
Karthi
----- Original Message ----
From: Matthew Russell <[email protected]>
To: [email protected]
Sent: Friday, January 9, 2009 12:53:49 PM
Subject: Re: Container title
Karthi - Did you try something like this for your CDATA section?
<![CDATA[
<script type="text/javascript">
function changeTitle(form) {
var title='karthi';
gadgets.window.setTitle(title);
alert('hi');
}
</script>
<DIV style="height: 150px; overflow: auto;">
<INPUT TYPE="button" NAME="button" Value="Change Title"
onClick="changeTitle(this.form)">
<a href="http://www.yahoo.com">
<b><i>Hello Yahoo</i></b>
</a>
</DIV>
]]>
On Jan 9, 2009, at 11:44 AM, karthi keyan wrote:
> Thank you matthew. Attached is one of my sample file.
>
> I tried and it is partially working :) I may be wrong. Anyways attached is my
> file. Once you click the "Hello yahoo" link inside the gadget it will display
> a page. Here we need to be able to scroll it inside the gadget. Thanks in
> advance.
>
> Thanks,
> Karthi
>
>
>
> ----- Original Message ----
> From: Matthew Russell <[email protected]>
> To: [email protected]
> Sent: Friday, January 9, 2009 12:20:06 PM
> Subject: Re: Container title
>
> Karthi -
>
> Your existing code from below
>
> <div id="gadget-chrome-2" style="width: 200px; height:
>200px;overflow:auto;"></div>
>
> is html in the gadget *container* -- which is what the iframe gets built
> inside of. This is not where you provide the style. You have to take your
> actual gadget's XML file and make the outermost div (for example) in the
> CDATA section in there have the style property for overflow because the stuff
> in your gadget's xml file is what gets built inside of that iframe. Make
> sense?
>
> Try that and if it doesn't work, send back your gadget's XML file, and I will
> help.
>
>
>
> On Jan 9, 2009, at 11:13 AM, karthi keyan wrote:
>
>> Thanks for the inputs dave. I will try. Can you please tell me exactly in
>> which line of code I should specify overflow:auto ? to scroll inside the
>> gadget iframe. or what changes should I do with this existing code ?
>>
>> Thanks,
>> Karthi
>>
>>
>>
>> ----- Original Message ----
>> From: "Citron, David" <[email protected]>
>> To: [email protected]
>> Sent: Friday, January 9, 2009 12:04:16 PM
>> Subject: RE: Container title
>>
>> Karthi,
>>
>> Your gadget *contents* (the gadget itself, the stuff rendered *inside* the
>> iframe) needs to be contained in a div with style overflow:auto. The chrome
>> is part of the container. You want scrolling inside the gadget iframe.
>>
>> If you use Firefox, you can install the excellent Firebug extension
>> (http://getfirebug.com/ and
>> https://addons.mozilla.org/en-US/firefox/addon/1843) to really see what's
>> happening on your page.
>>
>> You can also right-click inside your gadget and click on "This Frame->Show
>> Only This Frame" in Firefox to see what's being rendered for your gadget
>> independent of the container.
>>
>> -Dave
>>
>> -----Original Message-----
>> From: karthi keyan [mailto:[email protected]]
>> Sent: Friday, January 09, 2009 11:32 AM
>> To: [email protected]
>> Subject: Re: Container title
>>
>> Hi,
>>
>> I have already tried all these and whatever dave mentioned. But it didn't
>> worked for me. The scroll bars just appear for the div area and not for our
>> gadget container. So we couldn't scroll down the contents ! Here are some
>> of my code segments. Please look in to this and let me know if there is
>> anything wrong.
>>
>> my.LayoutManager = function() {
>> gadgets.LayoutManager.call(this);
>> };
>> my.LayoutManager.inherits(gadgets.LayoutManager);
>> my.LayoutManager.prototype.getGadgetChrome = function(gadget) {
>> var chromeId = 'gadget-chrome-' + gadget.id;
>> return chromeId ? document.getElementById(chromeId) : null;
>> };
>> my.init = function() {
>> gadgets.container.layoutManager = new my.LayoutManager();
>> };
>> my.renderGadgets = function() {
>> for (var i = 0; i < my.gadgetSpecUrls.length; ++i) {
>> var gadget = gadgets.container.createGadget(
>> {specUrl: my.gadgetSpecUrls[i], title: my.titles[i],width:200});
>> gadget.setServerBase("http://shindig/gadgets/");
>> gadgets.container.addGadget(gadget);
>> gadgets.container.renderGadget(gadget);
>> }
>> };
>>
>>
>> <div id="gadget-chrome-2" style="width: 200px; height:
>>200px;overflow:auto;"></div>
>>
>> Is there any other way to enable scrolls ?
>>
>> Thanks,
>> Karthi
>>
>>
>> ----- Original Message ----
>> From: Matthew Russell <[email protected]>
>> To: [email protected]
>> Sent: Friday, January 9, 2009 10:30:43 AM
>> Subject: Re: Container title
>>
>> Karthi -
>>
>> You should be able to set a fixed size on a containing element (like the
>> outermost one, for example) in the gadget's HTML and then style the node
>> with "overflow:auto;".
>>
>> So, something like
>>
>> <div style="height: 300px; overflow:auto">
>> Lots of content
>> </div>
>>
>> Or something of the sort
>>
>>
>> On Jan 9, 2009, at 9:06 AM, karthi keyan wrote:
>>
>>> Is there any way that we can enable the scroll bar of the gadgets ? My
>>> content is bit more and it is hidden because of its smaller size. I am
>>> trying to enable the scroll bars. Can anyone please shed some light on this
>>> ? Thanks in Advance.
>>>
>>> Thanks,
>>> Karthi
>>>
>>>
>>>
>>> ----- Original Message ----
>>> From: "Citron, David" <[email protected]>
>>> To: [email protected]
>>> Sent: Thursday, January 8, 2009 1:25:58 PM
>>> Subject: RE: Container title
>>>
>>> It's bizarre that the standard method of setting the title is not working
>>> for you. Did you try restarting Shindig/clearing your browser cache after
>>> making your change just to make sure it's not a caching issue?
>>>
>>> As for your other question, the chrome around the gadget is controlled by
>>> the container--the implementer of the gadget can't do much about it besides
>>> set the title, height, etc. if supported. The gadget only controls the
>>> iframe in which it lives.
>>>
>>> If you write your own container you can put whatever you want in the title
>>> bar (see iGoogle/Orkut for a different look). Those links that you see in
>>> the sample container are created by the example
>>> gadgets.IfrGadget.prototype.getTitleBarContent() function in
>>> javascript/container/gadgets.js
>>>
>>> Thanks,
>>> Dave
>>>
>>> -----Original Message-----
>>> From: karthi keyan [mailto:[email protected]]
>>> Sent: Thursday, January 08, 2009 1:05 PM
>>> To: [email protected]
>>> Subject: Re: Container title
>>>
>>> Thanks matthew & dave.
>>>
>>> Yay ! passing the title to the object of params worked for me. Thank you so
>>> much matthew !
>>>
>>> I tried nocache=1 along with the property file changes which dave
>>> mentioned. But it didn't worked ! I don't know why.
>>>
>>> BTW, there are two links "settings" and "toggle" just nearby the title. I
>>> want to get rid of these. where should I make these changes ? Any ideas ?
>>>
>>> Thanks,
>>> Karthi
>>>
>>>
>>>
>>> ----- Original Message ----
>>> From: Matthew Russell <[email protected]>
>>> To: [email protected]
>>> Sent: Thursday, January 8, 2009 12:37:41 PM
>>> Subject: Re: Container title
>>>
>>> Hmm. I just verified that gadgets.window.setTitle seems to be working fine
>>> with the latest code I checked out a day or two ago. Maybe you are
>>> experiencing a caching problem of some kind? Have you tried adding
>>> nocache=1 into your url and all that? (My layout manager inherits directly
>>> from gadgets.LayoutManager similar to the sample code.)
>>>
>>>
>>> On Jan 8, 2009, at 11:24 AM, karthi keyan wrote:
>>>
>>>> Thanks for your reply dave. I exactly tried the below. It didn't throw me
>>>> any error. But the title didn't appeared instead title was displayed as
>>>> "title". I don't know what is wrong ? should I include any files ?
>>>>
>>>> I am just using the sample container page as template and I build other
>>>> gadgets with that. Please let me know if I am wrong in any place.
>>>>
>>>> Thanks,
>>>> Karthi
>>>>
>>>>
>>>>
>>>> ----- Original Message ----
>>>> From: "Citron, David" <[email protected]>
>>>> To: [email protected]
>>>> Sent: Thursday, January 8, 2009 12:16:52 PM
>>>> Subject: RE: Container title
>>>>
>>>> Was this one of the things you tried?
>>>>
>>>> <Module>
>>>> <ModulePrefs title="Put your title here">
>>>> ...
>>>>
>>>> To support dynamic title modification, you can then add:
>>>>
>>>> <Require feature="settitle"/>
>>>> </ModulePrefs>
>>>>
>>>> and then in JavaScript, do:
>>>>
>>>> gadgets.window.setTitle("Some other title");
>>>>
>>>> assuming that the container supports it.
>>>>
>>>> What else did you try?
>>>> -Dave
>>>>
>>>> -----Original Message-----
>>>> From: karthi keyan [mailto:[email protected]]
>>>> Sent: Thursday, January 08, 2009 12:14 PM
>>>> To: [email protected]
>>>> Subject: Container title
>>>>
>>>> Hi,
>>>>
>>>> I need to set the title to my gadget. I tried a lot and nothing worked for
>>>> me. Can anyone please help me ? Thanks in Advance.
>>>>
>>>> Thanks,
>>>> Karthi
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
>
> <yahoo.xml>