Clickable Link within a Control?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Clickable Link within a Control?

Jim Logan-3
Hello again,

Does anyone know if it's possible to make a URL inside a text field or
text area clickable? I would like to allow the user to click the URL to
open its page content in a new browser window or tab. It would be even
cooler if I could have a user-friendly string represent the URL. It
seems this should at least be possible in the rich text area, but I
don't see how yet.

Thanks,
-Jim



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Clickable Link within a Control?

Erik Bruchez
Administrator
Jim,

This is not possible with the basic input and textarea fields, where  
we rely on the HTML input and textarea fields (which don't support  
this functionality in any browser we know).

Yes maybe this could work with the rich HTML editor, but it doesn't  
seem like it's working out of the box. We would like to switch to the  
YUI RTE at some point, but even there, you can't seem to be able to  
click on links within the edited text.

-Erik

On May 1, 2008, at 8:23 AM, Jim Logan wrote:

> Hello again,
>
> Does anyone know if it's possible to make a URL inside a text field  
> or text area clickable? I would like to allow the user to click the  
> URL to open its page content in a new browser window or tab. It  
> would be even cooler if I could have a user-friendly string  
> represent the URL. It seems this should at least be possible in the  
> rich text area, but I don't see how yet.
>
> Thanks,
> -Jim
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Clickable Link within a Control?

Jim Logan-3
Erik Bruchez wrote:

> Jim,
>
> This is not possible with the basic input and textarea fields, where
> we rely on the HTML input and textarea fields (which don't support
> this functionality in any browser we know).
>
> Yes maybe this could work with the rich HTML editor, but it doesn't
> seem like it's working out of the box. We would like to switch to the
> YUI RTE at some point, but even there, you can't seem to be able to
> click on links within the edited text.
>
> -Erik
Erik,

I was thinking about this more today, as I read through the user
manuals, and I thought of something that might work. I haven't tried
this yet, as I've yet to even type in my first XForm, but the idea is to
switch back and forth between viewing and editing each hyperlink.

An instance document would hold a URL and a label together, maybe like
<foo><link href="http://...">label</link></foo>. An output control (if
that's the right term) would have an XPath expression that would build
an HTML anchor by concatenating the URL and label, like <a
href="http://...">label</a>. A little icon next to the rendered anchor
would toggle between showing the anchor and showing two related controls
that allow editing of the URL and label. When the user edits the URL or
label and toggles back, there would be a working, updated hyperlink.

Could this work? Is there some way to create my own parameterized widget
so I wouldn't have to repeat this pattern everywhere I wanted an
editable hyperlink?

Thanks,
-Jim



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Clickable Link within a Control?

Alessandro Vernet
Administrator
On Thu, May 1, 2008 at 3:04 PM, Jim Logan <[hidden email]> wrote:
>  An instance document would hold a URL and a label together, maybe like
> <foo><link href="http://...">label</link></foo>. An output control (if
> that's the right term) would have an XPath expression that would build an
> HTML anchor by concatenating the URL and label, like <a
> href="http://...">label</a>. A little icon next to the rendered anchor would
> toggle between showing the anchor and showing two related controls that
> allow editing of the URL and label. When the user edits the URL or label and
> toggles back, there would be a working, updated hyperlink.

Yes, this would not unlike the inline editing of the items in the
to-do lists examples (http://www.orbeon.com/ops/xforms-todo/). Except
the button to go in edit mode is not right next to the field in the
to-do list example case, and what you are editing is not a URL.

>  Could this work? Is there some way to create my own parameterized widget so
> I wouldn't have to repeat this pattern everywhere I wanted an editable
> hyperlink?

For now you can use XSLT for this. See how this is done in
xforms-widget.xsl. In the future, we are planning to add an XBL-based
system (see https://wiki.objectweb.org/ops/Wiki.jsp?page=XFormsComponents).

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws