Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Custom widget - iframe focus?
Custom widget - iframe focus? [message #87750] Thu, 15 May 2008 16:27 Go to next message
Eclipse UserFriend
Originally posted by: mike.xmos.com

Hi,

I have a custom text widget (essentially just a <textarea> inside an
iframe) and I need to set the focus on the iframe in order to update the
cursor position in the textarea. I can call textarea.focus() from my
javascript but I think the iframe itself needs to have focus for the
textarea element to update.

In other words I need to simulate a mouse click on the textarea - the
line only update works after I click inside the textarea!

Does anyone know how to achieve this?

Thanks,
Mike
Re: Custom widget - iframe focus? [message #88535 is a reply to message #87750] Mon, 19 May 2008 15:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Hi Mike,

I don't know of any way to simulate a mouse click. But you might be
better of asking the experts at qooxdoo (http://qooxdoo.org).
As I know of many implications when using an IFRAME, I would
recommend to not use this element if ever possible.
If that doesn't help, maybe you could explain in greater detail what
you want to achieve?

Cheers,
Rüdiger


Mike Wrighton wrote:
> Hi,
>
> I have a custom text widget (essentially just a <textarea> inside an
> iframe) and I need to set the focus on the iframe in order to update the
> cursor position in the textarea. I can call textarea.focus() from my
> javascript but I think the iframe itself needs to have focus for the
> textarea element to update.
>
> In other words I need to simulate a mouse click on the textarea - the
> line only update works after I click inside the textarea!
>
> Does anyone know how to achieve this?
>
> Thanks,
> Mike
Re: Custom widget - iframe focus? [message #88682 is a reply to message #88535] Tue, 20 May 2008 08:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mike.xmos.com

Well I'm building a web-based IDE for C development. I'm using a
third-party javascript source editor called EditArea - this is normally
displayed within a webpage so the easiest (only?) way of using this as a
widget seemed to be to put it in it's own qooxdoo iframe. I'm also using
a Java applet to run client-side simulations, so I've had to use another
iframe for that. I'm quite new to web development so I wasn't really
aware of the issues in using iframes. Do you know of any alternatives?

Thanks for your help.
Mike


Rüdiger Herrmann wrote:
> Hi Mike,
>
> I don't know of any way to simulate a mouse click. But you might be
> better of asking the experts at qooxdoo (http://qooxdoo.org).
> As I know of many implications when using an IFRAME, I would recommend
> to not use this element if ever possible.
> If that doesn't help, maybe you could explain in greater detail what you
> want to achieve?
>
> Cheers,
> Rüdiger
>
>
> Mike Wrighton wrote:
>> Hi,
>>
>> I have a custom text widget (essentially just a <textarea> inside an
>> iframe) and I need to set the focus on the iframe in order to update
>> the cursor position in the textarea. I can call textarea.focus() from
>> my javascript but I think the iframe itself needs to have focus for
>> the textarea element to update.
>>
>> In other words I need to simulate a mouse click on the textarea - the
>> line only update works after I click inside the textarea!
>>
>> Does anyone know how to achieve this?
>>
>> Thanks,
>> Mike
Re: Custom widget - iframe focus? [message #88724 is a reply to message #88682] Tue, 20 May 2008 09:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Hi Mike,

did you try to put the EditArea in a qooxdoo div (e.g.
CanvasLayout)? The gmaps example in the custom widget tutorial does
this. The tutorial can be found here:
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. rap.help/help/html/advanced/custom-widget.html
The most recent version of this document is available in the tooling
download.

Cheers,
Rüdiger


Mike Wrighton wrote:
> Well I'm building a web-based IDE for C development. I'm using a
> third-party javascript source editor called EditArea - this is normally
> displayed within a webpage so the easiest (only?) way of using this as a
> widget seemed to be to put it in it's own qooxdoo iframe. I'm also using
> a Java applet to run client-side simulations, so I've had to use another
> iframe for that. I'm quite new to web development so I wasn't really
> aware of the issues in using iframes. Do you know of any alternatives?
>
> Thanks for your help.
> Mike
>
>
> Rüdiger Herrmann wrote:
>> Hi Mike,
>>
>> I don't know of any way to simulate a mouse click. But you might be
>> better of asking the experts at qooxdoo (http://qooxdoo.org).
>> As I know of many implications when using an IFRAME, I would recommend
>> to not use this element if ever possible.
>> If that doesn't help, maybe you could explain in greater detail what
>> you want to achieve?
>>
>> Cheers,
>> Rüdiger
>>
>>
>> Mike Wrighton wrote:
>>> Hi,
>>>
>>> I have a custom text widget (essentially just a <textarea> inside an
>>> iframe) and I need to set the focus on the iframe in order to update
>>> the cursor position in the textarea. I can call textarea.focus() from
>>> my javascript but I think the iframe itself needs to have focus for
>>> the textarea element to update.
>>>
>>> In other words I need to simulate a mouse click on the textarea - the
>>> line only update works after I click inside the textarea!
>>>
>>> Does anyone know how to achieve this?
>>>
>>> Thanks,
>>> Mike
Re: Custom widget - iframe focus? [message #89187 is a reply to message #88724] Wed, 21 May 2008 12:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mike.xmos.com

I haven't tried that, but since my javascript editor requires an html
textarea to do the syntax highlighting on, I assumed I would need an
iframe for the html?

Rüdiger Herrmann wrote:
> Hi Mike,
>
> did you try to put the EditArea in a qooxdoo div (e.g. CanvasLayout)?
> The gmaps example in the custom widget tutorial does this. The tutorial
> can be found here:
> http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. rap.help/help/html/advanced/custom-widget.html
>
> The most recent version of this document is available in the tooling
> download.
>
> Cheers,
> Rüdiger
>
>
> Mike Wrighton wrote:
>> Well I'm building a web-based IDE for C development. I'm using a
>> third-party javascript source editor called EditArea - this is
>> normally displayed within a webpage so the easiest (only?) way of
>> using this as a widget seemed to be to put it in it's own qooxdoo
>> iframe. I'm also using a Java applet to run client-side simulations,
>> so I've had to use another iframe for that. I'm quite new to web
>> development so I wasn't really aware of the issues in using iframes.
>> Do you know of any alternatives?
>>
>> Thanks for your help.
>> Mike
>>
>>
>> Rüdiger Herrmann wrote:
>>> Hi Mike,
>>>
>>> I don't know of any way to simulate a mouse click. But you might be
>>> better of asking the experts at qooxdoo (http://qooxdoo.org).
>>> As I know of many implications when using an IFRAME, I would
>>> recommend to not use this element if ever possible.
>>> If that doesn't help, maybe you could explain in greater detail what
>>> you want to achieve?
>>>
>>> Cheers,
>>> Rüdiger
>>>
>>>
>>> Mike Wrighton wrote:
>>>> Hi,
>>>>
>>>> I have a custom text widget (essentially just a <textarea> inside an
>>>> iframe) and I need to set the focus on the iframe in order to update
>>>> the cursor position in the textarea. I can call textarea.focus()
>>>> from my javascript but I think the iframe itself needs to have focus
>>>> for the textarea element to update.
>>>>
>>>> In other words I need to simulate a mouse click on the textarea -
>>>> the line only update works after I click inside the textarea!
>>>>
>>>> Does anyone know how to achieve this?
>>>>
>>>> Thanks,
>>>> Mike
Re: Custom widget - iframe focus? [message #89262 is a reply to message #89187] Wed, 21 May 2008 18:46 Go to previous message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Mike,

as far as I know a this doesn't force you to use an ifame. But I am
not Javascript expert at all. You may just give it a try or ask on
the experts from the qooxdoo mailing-list.

Cheers,
Rüdiger



Mike Wrighton wrote:
> I haven't tried that, but since my javascript editor requires an html
> textarea to do the syntax highlighting on, I assumed I would need an
> iframe for the html?
>
> Rüdiger Herrmann wrote:
>> Hi Mike,
>>
>> did you try to put the EditArea in a qooxdoo div (e.g. CanvasLayout)?
>> The gmaps example in the custom widget tutorial does this. The
>> tutorial can be found here:
>> http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. rap.help/help/html/advanced/custom-widget.html
>>
>> The most recent version of this document is available in the tooling
>> download.
>>
>> Cheers,
>> Rüdiger
>>
>>
>> Mike Wrighton wrote:
>>> Well I'm building a web-based IDE for C development. I'm using a
>>> third-party javascript source editor called EditArea - this is
>>> normally displayed within a webpage so the easiest (only?) way of
>>> using this as a widget seemed to be to put it in it's own qooxdoo
>>> iframe. I'm also using a Java applet to run client-side simulations,
>>> so I've had to use another iframe for that. I'm quite new to web
>>> development so I wasn't really aware of the issues in using iframes.
>>> Do you know of any alternatives?
>>>
>>> Thanks for your help.
>>> Mike
>>>
>>>
>>> Rüdiger Herrmann wrote:
>>>> Hi Mike,
>>>>
>>>> I don't know of any way to simulate a mouse click. But you might be
>>>> better of asking the experts at qooxdoo (http://qooxdoo.org).
>>>> As I know of many implications when using an IFRAME, I would
>>>> recommend to not use this element if ever possible.
>>>> If that doesn't help, maybe you could explain in greater detail what
>>>> you want to achieve?
>>>>
>>>> Cheers,
>>>> Rüdiger
>>>>
>>>>
>>>> Mike Wrighton wrote:
>>>>> Hi,
>>>>>
>>>>> I have a custom text widget (essentially just a <textarea> inside
>>>>> an iframe) and I need to set the focus on the iframe in order to
>>>>> update the cursor position in the textarea. I can call
>>>>> textarea.focus() from my javascript but I think the iframe itself
>>>>> needs to have focus for the textarea element to update.
>>>>>
>>>>> In other words I need to simulate a mouse click on the textarea -
>>>>> the line only update works after I click inside the textarea!
>>>>>
>>>>> Does anyone know how to achieve this?
>>>>>
>>>>> Thanks,
>>>>> Mike
Previous Topic:Tree plus and minus image
Next Topic:Set background on compisite with theme.properties
Goto Forum:
  


Current Time: Thu Apr 25 20:01:29 GMT 2024

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

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

Back to the top