Results 1 to 6 of 6
  1.    #1  
    Hello everyone.
    I am trying to make a dictionary app that show content with hyperlink to jump from word to word.

    After tap the hyperlink this app should jump to another word or outside website, though I don't know how to do this.

    I have considered about two ways but both failed:

    1. If the content is present as HTML, the hyperlink should be like dict://xxxxxx and this protocol will call this program itself and program can parse and jump to it. But I cannot find how to set up a dict:// protocol in WebOS.

    2. If the content is present as SMS program , the hyperlink will be same as the telephone number hyperlink. But After reading SMS source code coming with SDK, I cannot find how to do this.

    Thanks for your help.
  2. #2  
    just use an envent listener for tapping the hyperlink and then use the open method

    EX. EventListener(this.controller.get("hyperlink"), onTap, this.function.bind(this));

    SceneNameAssistant.prototype.function = function() {
  3. #3  
    psuedo code..., but it's something like that
  4.    #4  
    Quote Originally Posted by tha2nddunn View Post
    psuedo code..., but it's something like that
    Well, the hyperlink should be dynamically generated in a HTML control.

    If it is part of HTML inside a HTML control , how to use this.controller.get to get it ? I cannot make it work.
  5. #5  
    just give each of the elements an id. That can then be used to retrieve it using this.controller.get(id) (or $(id) or document.getElementById(id))
  6. #6  
    You can setup events en-masse. for instance:


    then in your event listener:

    someeventhandler: function( event ){
    var element = event.element();
    ...Now do something with the element, like find out if it points to a web page...

    Now, that's out of the way, there are dozens of ways this can be accomplished and, without knowing a bit more about what you're trying to accomplish, it's hard to tell you what the best thing to do is.
    Also, in HTML you can name links and jump to them with hash links. Like:
      <li><a href="#section-F">Section F</a></li>
    <h2><a name="section-F">Section F</a></h2>
    An explanation, links without an href just show up as normal text. No blue text or underlining. Links with an href pointing to #something point to a named link on the current page. - Slalom - twitter - facebook
    A posted thanks dies with the thread. Clicking the button lasts until the admins get bored with this site and throw it in the recycling bin.

Posting Permissions