Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Object not found within qooxdoo code
Object not found within qooxdoo code [message #137620] Wed, 24 June 2009 15:36 Go to next message
Eclipse UserFriend
Originally posted by: s0181013.mail.inf.tu-dresden.de

Hello everyone,

I observe a weird behavior when using the
'document.getElementById(this._id); like it is done in the GMAPs
Example. It returns null, if I don't use the two alerts (see below)
before and after this line of code. This does not make any sense to me.
How can I eliminate this error?

Furthermore this code functions within the internal browser but not
within the external (Mozilla 3.0.11).

Thanks

// get the HTML's body element
var body = document.getElementsByTagName('body')[0];

if(body) {

alert("FlashForm ContainerObject 1:"
+document.getElementById(this._id));

var ContainerObject = document.getElementById(this._id);

alert("FlashForm ContainerObject 2:"
+document.getElementById(this._id));

ContainerObject.innerHTML =
'<object width=\"425\" height=\"373\">'
+ '<param name=\"movie\"'
+ 'value=\"http://www.youtube.com/v/CwR6bFmAy-M"'
+ '"&rel=1&border=1\"></param>'
+ '<param name=\"wmode\" value=\"transparent\"></param>'
+ '<embed src=\"http://www.youtube.com/v/CwR6bFmAy-M"'
+ '"&rel=1&border=1\" type=\"application/x-shockwave-flash\"'
+ 'wmode=\"transparent\" width=\"425\" height=\"373\"></embed>
+ '</object>'
}
Re: Object not found within qooxdoo code [message #137694 is a reply to message #137620] Wed, 24 June 2009 19:29 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Jessica,

instead of "document.getElementById(this._id)" use "this.getElement()".
Please not that in qooxdoo the actual HTML element is created when the
widget appears on the screen. You can move your code in the "appear" event.

Best,
Ivan

Jessica Nierth wrote:
> Hello everyone,
>
> I observe a weird behavior when using the
> 'document.getElementById(this._id); like it is done in the GMAPs
> Example. It returns null, if I don't use the two alerts (see below)
> before and after this line of code. This does not make any sense to
> me. How can I eliminate this error?
>
> Furthermore this code functions within the internal browser but not
> within the external (Mozilla 3.0.11).
>
> Thanks
>
> // get the HTML's body element
> var body = document.getElementsByTagName('body')[0];
>
> if(body) {
>
> alert("FlashForm ContainerObject 1:"
> +document.getElementById(this._id));
>
> var ContainerObject = document.getElementById(this._id);
>
> alert("FlashForm ContainerObject 2:"
> +document.getElementById(this._id));
>
> ContainerObject.innerHTML =
> '<object width=\"425\" height=\"373\">'
> + '<param name=\"movie\"'
> + 'value=\"http://www.youtube.com/v/CwR6bFmAy-M"'
> + '"&rel=1&border=1\"></param>'
> + '<param name=\"wmode\" value=\"transparent\"></param>'
> + '<embed src=\"http://www.youtube.com/v/CwR6bFmAy-M"'
> + '"&rel=1&border=1\" type=\"application/x-shockwave-flash\"'
> + 'wmode=\"transparent\" width=\"425\" height=\"373\"></embed>
> + '</object>'
> }
Previous Topic:Context Menu is not displayed entirely at the bottom of browsers
Next Topic:[ANN] RAP 1.2 released
Goto Forum:
  


Current Time: Fri Dec 03 17:42:21 GMT 2021

Powered by FUDForum. Page generated in 0.22737 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top