Friday, April 1, 2011

Re: JSNI Newbie Question

try setting a breakpoint, run it in firefox with firebug installed and check how the scoping is.

http://www.qc4blog.com/?p=657

cheers, andi

(vom fon)

On 01.04.2011, at 13:17, Ed <ej197us@gmail.com> wrote:

> I ran the system in chrome and found this
>
> Uncaught TypeError: Object [object DOMWindow] has no method 'saveButton'
>
> so it just might be unreachable?
>
> On Fri, Apr 1, 2011 at 6:56 AM, Ed <ej197us@gmail.com> wrote:
>> Thank you Thomas!
>>
>> I changed the function to parent.
>>
>> It seams as if the parent.saveButton() function is unreachable from
>> within an IFRAME. The IFRAME is the window to display the legacy code
>> which is plain HTML..
>>
>> This is the container definition:
>>
>> private static Frame myFrame = new Frame();
>>
>> This frame is populated through http gets to the server.
>>
>> Could this be true about being unreachable? I have not figured out
>> how to debug this other that it does not work.
>>
>>
>> Ed Lang
>>
>> On Fri, Apr 1, 2011 at 6:25 AM, Thomas Broyer <t.broyer@gmail.com> wrote:
>>> Your JSNI looks good. Your JavaScript is broken though: should be
>>> onclick="parent.saveButton()" (I'd however probably put it in the onsubmit
>>> of the form though...)
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google Web Toolkit" group.
>>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-web-toolkit+unsubscribe@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment