facebook

Change image in a page at runtime?

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #319372 Reply

    hammet
    Member

    Hi,

    I would like to change the images of a page using some parameter.
    I have a .mobi that shows an element with text and images. I would like to change, for example, the directory of the URL of the different images. Something like this:
    “htdocs\main\<parameter>\logo_game_alpha.png”
    Then I could call the page with a parameter like: “folder01”, “folder02″… you know..

    Regards
    Hammet

    #319373 Reply

    support-michael
    Keymaster

    @hammet

    If I understand your requirement correctly the idea is to have a parameterized path to 1 or more images. Correct?

    I know how to change a single image src path programmatically but I’m not sure how to parameterize it. I have meeting in the morning with dev team and will discuss with them for suggestions.

    #319374 Reply

    hammet
    Member

    Yes. That’s the idea.

    To change the path of images based in a parameter.

    #319416 Reply

    support-michael
    Keymaster

    @hammet

    Talked to the dev team. The approach is to call a custom javascript handler triggered by an event in your UI. Based on the application’s content the handler should then programmatically change the image path of the widgets.

    I will provide an example later today how you might go about doing this.

    #319421 Reply

    hammet
    Member

    Thanks! I can’t wait to take a look at the example.

    #319425 Reply

    support-michael
    Keymaster

    See this simple example that I created based on my understanding of your requirements:
    http://www.genuitec.com/support-mobione/viewtopic.php?f=14&t=2044

    #319648 Reply

    hammet
    Member

    Great! Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Change image in a page at runtime?

You must be logged in to post in the forum log in