facebook

Problem Images in html widget

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

    cpmac61
    Member

    Hello
    I’m having problems with images in an html widget. I’m using html widgets to justify the text and adapt to images.
    The images aren’t being transfered to the app.www/images folder.
    On opening the app in the simulator, i have squares where the images in html widgets should be. If i click right to open in new tab i get image not found. Images placed with the image widget are visible.
    If i use the name of an image placed elsewhere by an image widget, the image showsin the html widget. If i copy the images to the app-www/images folder they still don’t show, but if i click right to open in new tab I can see them.

    #345593 Reply

    cpmac61
    Member

    I’ve found a way round this problem , but I’m sure such a ruse shouldn’t be necessary.
    On my opening page ive put a minuscule tranparent image that links to a screen full of the images i want in my html widgets, and it works.

    #345609 Reply

    cpmac61,

    I had a similar problem with my HTML box and got around it by playing with the BRING-TO-FRONT and SEND-TO-BACK settings of the HTML item on the page.
    This is available on the top line of the editor ( the UP and DOWN arrows).

    FWIW,
    TG

    #345676 Reply

    cpmac61
    Member

    I tried moving the html back and forewards, no change in the images coming through.

    #345678 Reply

    cpmac61
    Member

    I’m using the latest version of mobione 2.5.0
    The basic problem is that images placed in a html widget by

    
    <img src="images/tumulus-plan.jpg" class="img200h"/>
    <img src="images/tumulus.jpg" class="img200h"/>
    

    aren’t being transfered to the app-www/images folder

    the following link illustrates the situation
    http://goo.gl/BMiOln

    Clicking on “history pf Bayeux” one gets to a screen with an image and a square with a question mark in it. The only difference between the two images is that the visible one also exists in the app as an image widget, the invisible one only exists in the html widget.

    #345701 Reply

    Hi cpmac61,

    Add your images as additional project files so they can be added to your project. Let me know how it goes or if you need further assistance.

    #345704 Reply

    cpmac61
    Member

    This works, but only if I put the files in the app-www/images folder. They are not transfered there from an other folder.

    #345710 Reply

    Hi cpmac61,

    I was referring to using the Additional Project Files property, See last part of section #2:
    http://www.genuitec.com/mobile/docs/projectOrg/projectOrg.html#organizing_new_project

    #345718 Reply

    cpmac61
    Member

    Thanks for the reply.
    I’ve read the link. My image files are in my-app/images. I’ve added the files as additional project files, but they don’t end up in my-app-www/images. If I move them from the original folder that the additional project files point to, I get an error message “can’t find images/image.jpg”, so the compiler looks for them but doesn’t move them.
    I’m using a css file which gets copied to my-app-www. Any images added by an image widget get transfered to the my-app_www/images file.

    #345724 Reply

    support-michael
    Keymaster

    A couple of 1st principles to include in this conversation:

    1) the designer center will transfer all images associated with any widget property (imageButton, image, background property) to the project’s www/images folder and generate resource paths to these image files in a corresponding project css file.

    2) all additional project resources including images that you include in your project are merged into the root www/ folder. The design center code-generator does not try to get too smart and auto-organize included files. You can manually copy dirs & files into the www/ project dir and then reference them with a relative url from custom code in html widget or additional css and js files included in the project.

    #345751 Reply

    cpmac61
    Member

    Thanks. I see it now.

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Problem Images in html widget

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