Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Posts: 22
Registered: ‎11-18-2009
My Device: Not Specified

Not underline Links?

Hi @all!

 

Is it possible to inhibit hyperlinks to be underlined?

 

Regards,

 

Alex

Developer
Posts: 168
Registered: ‎11-01-2008
My Device: Galaxy S II
My Carrier: Meteor (Ireland)

Re: Not underline Links?

It sure is - just set the 'text-decoration' CSS attribute to 'none'. For example, if you wanted to stop the underline appearing for all hyperlinks, you would just put something like this in your CSS stylesheet:

 

 

a { text-decoration: none; }

 

 

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Not underline Links?

Underlined links can also be added to your page by default depending on your page content.

 

The BlackBerry Browser includes a useful feature that automaticically provides integration between the Phone and Messages applications.  If the content of your page includes text that matches the pattern of a phone number, or email address, the browser will automatically generate links that will invoke the corresponding application when selected.

 

If you do not wish to make use of this feature on your webpage, simply include the following META tag in the page HEAD:

<meta HTTP-EQUIV=”x-rim-auto-match” CONTENT=”none”>

 

Here's a screenshot that shows how a plain-text phone number is automatically rendered as a link to the Phone application:

 

 

links.png

 

 

 

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Developer
Posts: 22
Registered: ‎11-18-2009
My Device: Not Specified

Re: Not underline Links?

Thats very interresting! Is there also a method to invoke such behaviour?

 

E.x. German numbers are often formated like that 0721 1234557

Problem with that: The Number is seperated into two numbers.

 

Something like <tel>34567890 4567890</tel> would be great!

 

(I have no idea why text-decoration did not work on my first approach - anyway now it does)

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Not underline Links?

For more information on the different link types that the BlackBerry Browser supports, please see the section titled "Link Behaviour" (~ page 24) in the following Browser Fundamentals Guide.

 

Here's one example:

 

 

<a href="tel:07211234557">German phone number</a>

 

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Developer
Posts: 168
Registered: ‎11-01-2008
My Device: Galaxy S II
My Carrier: Meteor (Ireland)

Re: Not underline Links?

If you are prepared to get your hands dirty writing a little Java, you can do really cool things in this area. Investigate the classes listed below. They enable you to 'teach' the BlackBerry OS how to recognise any particular text pattern you like so that it will do the little broken underline trick wherever it occurs (not only in the browser but in pretty much any of the built-in BlackBerry apps including Messages, Calendar, Tasks, etc.). We have used this in our application to support a proprietary URL scheme and I know that Twitter clients use this so that the @username pattern will be 'linkified' wherever it occurs in emails, SMSes, etc. 

 

 

  • net.rim.device.api.ui.component.ActiveFieldContext
  • net.rim.device.api.ui.component.ActiveFieldCookie
  • net.rim.device.api.util.StringPattern
  • net.rim.device.api.util.StringPatternRepository

 

Oh yeah, if you want to do this in a widget app you just have to hack it into the code generated by bbwp.exe. 

New Developer
Posts: 2
Registered: ‎12-11-2009
My Device: Not Specified

Re: Not underline Links?

That was a good one!!

but this can even be done in CSS right .

 

 

Web Development Services