Results 1 to 4 of 4
  1.    #1  
    Hello,

    well I've got a question because I'm building my very first webOS application and there are some basic questions now

    (the app will be for Designers)

    Well I've got my Main-scene and there html content in this content i've got a picture:

    <img class="float_right" id="a0_h" border="0" src="images/icons/circle.png"/>

    this picture should now link to my scene "a0_h" (the scene is registered)

    how can i link the picture to my scene? I've read some tutorials but i don't understand how it works.

    And sorry for my english guys, i know it's not the best ^^
  2. #2  
    Quote Originally Posted by douth View Post
    Hello,

    well I've got a question because I'm building my very first webOS application and there are some basic questions now

    (the app will be for Designers)

    Well I've got my Main-scene and there html content in this content i've got a picture:

    <img class="float_right" id="a0_h" border="0" src="images/icons/circle.png"/>

    this picture should now link to my scene "a0_h" (the scene is registered)

    how can i link the picture to my scene? I've read some tutorials but i don't understand how it works.

    And sorry for my english guys, i know it's not the best ^^
    If you have that in your html content, and the image circle.png in the images/icons folder, it should be showing already.

    You can access it by this.controller.get("a0_h")
    WOG Dev - WebOS Group http://www.WebOSGroup.com
    PMP Dev - http://www.PimpMyPre.com
    Apps: WOG O.S.K., WOG Card Keeper, WOG Glowstick, WOG Kid Protect, PreLoad, PimpMySounds
  3.    #3  
    thanks for your answer!!!
    yes it's already there.

    Well i think the main problem is my bad javascript knowledge.
    How does the this.controller.get(a0_h") work?
    Where I have to write it in?
  4. #4  
    Quote Originally Posted by douth View Post
    thanks for your answer!!!
    yes it's already there.

    Well i think the main problem is my bad javascript knowledge.
    How does the this.controller.get(a0_h") work?
    Where I have to write it in?
    Well, what are you trying to do? Listen for a tap on it?

    You'd set up a handler, then listen for the event. tapOnImage would be the function that's called. In there, you would perform whatever action it is you wanted to perform.

    Code:
    	this.imageTapHandler= this.tapOnImage.bindAsEventListener(this);
    
    	Mojo.Event.listen(this.controller.get('a0_h'),Mojo.Event.tap, this.imageTapHandler);
    Check out the developer reference on Home - Palm Developer Center for more info on how to get started and the things you can do.
    WOG Dev - WebOS Group http://www.WebOSGroup.com
    PMP Dev - http://www.PimpMyPre.com
    Apps: WOG O.S.K., WOG Card Keeper, WOG Glowstick, WOG Kid Protect, PreLoad, PimpMySounds

Posting Permissions