Dynamic resizing issue with iGoogle
Hi,
I'm looking to use the dynamic resizing function on a html/js widget and I'm having a problem when it's placed into iGoogle, where only the top 20-30pixels are showing.
I thought that it might be the widget, so in widgetbox's edit widget area, i placed the following code into the 'widget code' editor at the bottom - the idea being that it's just a simple div.
<!--<script src="http://widgetserver.com/syndication/publisher/Main.js"></script>
<div style='height:620px;width:200px;background-color:green;'>
abc
</div>
<script type="text/JavaScript">
setTimeout(function(){
try
{
WIDGETBOX.publisher.Main.setWidgetLoaded();
}
catch(e)
{
alert(e.message);
}
alert("run");},5000);
</script>-->
I've tried it with and without the script, which is based on your documentation, but still I get the same problem. When the widget is previewed in your site it's fine - it's only with iGoogle.
The settimeout function seems to be running ok, in that the final alert pops up and the catch isn't firing.
The attached images show the widget in your environment and iGoogle's.
If you can help me get this simple code working then that would be greatly appreciated, as I can then look to get the actual widget up and running.
Many thanks,
Darren.
I'm looking to use the dynamic resizing function on a html/js widget and I'm having a problem when it's placed into iGoogle, where only the top 20-30pixels are showing.
I thought that it might be the widget, so in widgetbox's edit widget area, i placed the following code into the 'widget code' editor at the bottom - the idea being that it's just a simple div.
<!--<script src="http://widgetserver.com/syndication/publisher/Main.js"></script>
<div style='height:620px;width:200px;background-color:green;'>
abc
</div>
<script type="text/JavaScript">
setTimeout(function(){
try
{
WIDGETBOX.publisher.Main.setWidgetLoaded();
}
catch(e)
{
alert(e.message);
}
alert("run");},5000);
</script>-->
I've tried it with and without the script, which is based on your documentation, but still I get the same problem. When the widget is previewed in your site it's fine - it's only with iGoogle.
The settimeout function seems to be running ok, in that the final alert pops up and the catch isn't firing.
The attached images show the widget in your environment and iGoogle's.
If you can help me get this simple code working then that would be greatly appreciated, as I can then look to get the actual widget up and running.
Many thanks,
Darren.
1
person has this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
The company has acknowledged this problem.
-
Inappropriate?Hey Darren,
This issue relates to Google sizing everything Dynamically. Since we're sizing dynamically, it takes a moment after the load of the widget to size it. Google is most likely doing the same thing at the same time, in which case you'll get a Race condition.
There's nothing that we can do (unfortunately) do get Google to not size dynamically at this point. I'll see if we can find some sort of solution for this, but in the interim, Size Dynamically won't work in containers that size the Div dynamically (they're sizing it wrong).
-
Inappropriate?Ah, ok. That kind of makes sense.
Perhaps there's another way to achieve what we want. We essentially have a widget that comes in 2 sizes, a wide 1 and a narrow 1 say 300px x 400px and 200px x 400px. The user then selects wide or narrow from the customise section when they get the widget.
Since these sizes are fixed, is there a way for us to tell widgetbox what the size is based on the selection made? So, in a way, it would be like programmatically seting the height and width here:

That way widgetbox hasn't got to figure it out.
Thanks,
Darren. -
Inappropriate?There's not really an easy solution to this. We actually do the call to google to resize the div (I learned), but we're doing it before the widget has fully been resized. We have an issue logged to call that resize to them again after we're done resizing, so hopefully that would fix it in the coming week or two.
Loading Profile...



