I'm not completely sure why your code is running in a standalone page
but not within an orkut application. I was able to come up with a
decent workaround with the help of the discussion at
http://groups.google.com/group/google-excanvas/browse_thread/thread/b73e8820a43344e0?pli=1.
I've tested the gadget below in Firefox, Chrome, and IE and it seems
to work. Let me know if you run into any problems with it:
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Test Canvas">
<Require feature="opensocial-0.7"/>
</ModulePrefs>
<Content type="html">
<![CDATA[
<script type="text/javascript" src="http://
testcanvas.googlecode.com/files/excanvas.js"></script>
<script type="text/javascript">
function init() {
var context = null;
var canvas = document.getElementById('cv');
if (!canvas.getContext) {
canvas = window.G_vmlCanvasManager.initElement(canvas);
}
if (canvas.getContext) {
context = canvas.getContext('2d');
}
if (context && context.fillRect) {
context.fillRect(0,0,40,40);
}
}
gadgets.util.registerOnLoadHandler(init);
</script>
<canvas id="cv" width="400" height="300"></canvas>
]]>
</Content>
</Module>
Cheers!
- Jason
On Nov 19, 7:26 am, tbarbosa <[EMAIL PROTECTED]> wrote:
> IE 7.0.6001.18000.
> Remembering: the File1 works fine in Mozilla and IE7 too.
>
> On Nov 18, 6:51 pm, Jason <[EMAIL PROTECTED]> wrote:
>
> > Which version of Internet Explorer are you working with?
>
> > - Jason
>
> > On Nov 13, 4:43 am, tbarbosa <[EMAIL PROTECTED]> wrote:
>
> > > I've made a test project to testexcanvason orkut apps. And I need
> > > help to make it work.
>
> > > File1:http://testcanvas.googlecode.com/files/test.htm
> > > This is a normal htm page that usesexcanvas.
> > > It's very simple, and it just draw a 20x20 black rectangle, working in
> > > Mozilla Firefox and Internet Explorer.
>
> > > File2:http://testcanvas.googlecode.com/files/test.xml
> > > This is a test orkut app usingexcanvastoo.
> > > It's almost the same file, but adapted to orkut app format.
> > > When I open it in Mozilla it works, but in Internet Explorer it
> > > crashes with the message: "Object does not support this method or
> > > property."
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Orkut Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---