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
New Contributor
Posts: 7
Registered: ‎12-26-2011
My Device: BlackBerry Torch 9800, BlackBerry Playbook
My Carrier: AIS Thailand

Invoke Browser for Jquery Mobile RSS Feed

 

Hi, I'm trying to invoke Browser in PlayBook from an RSS Feed reader app. It is a Jquery Mobile App, so I include feeds.js file and this is how the feed entries were added

 

 



// Add feeds

 

       for (var i=0; i<feeds.entries.length; i++) {

// Get individual feed
var entry = feeds.entries[i];
var pubDate;

 

// Format published date
if (entry.publishedDate) {
var entryDate = new Date(entry.publishedDate);
var pubDate = entryDate.toLocaleDateString() + ' ' + entryDate.toLocaleTimeString();
           }

  // Add feed row
        html += '<li class="rssRow '+row+'">' + '<'+ options.titletag +'><a href="'+ entry.link +'" id=details title="View this feed at '+ feeds.title +'">'+ entry.title +'</a></'+ options.titletag +'>'

 

 


 

 

     entry.link is a link of an entry in an RSS Feed. Normally I can open this link in Internet Explorer or Google Chrome. However, it can't open in BlackBerry PlayBook Browser, so I tried to invoke by added like this

 

 


 

 // Add feed row
        html += '<li class="rssRow '+row+'">' + '<'+ options.titletag +'><a href="'+ entry.link +'" id=details title="View this feed at '+ feeds.title +'">'+ entry.title +'</a></'+ options.titletag +'>'

                       $("#details").click(function(e){
                       e.preventDefault();
                       href = $(this).attr("href");
                        var args = new blackberry.invoke.BrowserArguments(href);
                        blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER, args);
                        return false;
                        });

 


However, when I touch on entry title shown in the page, the PlayBook browser doesn't invoke successfully.

 

Is there anyway to invoke the PlayBook Browser for all entries??

 

Any helps, suggestions, recommendation I appreciate the most. 

 

Thank you

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

Re: Invoke Browser for Jquery Mobile RSS Feed

Your code looks like it could be correct.

 

1) Have you added <feature> elements for the blackberry.invoke and blackberry.invoke.BrowserArguments to your config.xml file?

 

2) Have you confirmed what the value is for your href variable at runtime?

 

3) Finally, I'd suggest using remote Web Inspector to identify if there is a runtime error happening when you click on the element.

 

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.