Custom widget - iframe focus? [message #87750] |
Thu, 15 May 2008 12:27  |
Eclipse User |
|
|
|
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 #88724 is a reply to message #88682] |
Tue, 20 May 2008 05:02   |
Eclipse User |
|
|
|
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 08:42   |
Eclipse User |
|
|
|
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 14:46  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04216 seconds