Results 1 to 8 of 8
  1.    #1  
    I have a strange issue and I'm wondering if anyone else has encountered it.

    In my scene's .html page, I have a DIV in which content from a search is placed.

    However, when the scene first opens, before any search has been done, the DIV is empty - so I wanted to fill the space initially with an image.

    Code:
    <div id='wrcontent'>
    	<center><img src="http://forums.precentral.net/../images/icon.png"></center>
    </div>
    Strange thing is, when I run the app, instead of the image showing up, it shows this little box that indicates something should be there.

    However, if I open up that same .html file in a regular browser, the image displays.

    Also, if I replace the <img> tage with text and run the app, the text displays.

    Anyone have any idea what might cause this behavior?
  2. #2  
    Quote Originally Posted by taalibeen View Post
    I have a strange issue and I'm wondering if anyone else has encountered it.

    In my scene's .html page, I have a DIV in which content from a search is placed.

    However, when the scene first opens, before any search has been done, the DIV is empty - so I wanted to fill the space initially with an image.


    Strange thing is, when I run the app, instead of the image showing up, it shows this little box that indicates something should be there.

    However, if I open up that same .html file in a regular browser, the image displays.

    Also, if I replace the <img> tage with text and run the app, the text displays.

    Anyone have any idea what might cause this behavior?
    Umm... I'd venture to guess that the problem is you are pointing to an image on a webpage (the precentral link you have there) and not on a local file system.

    Just a thought :P
  3.    #3  
    LOL, actually, I'm not sue how the precentral part got in there.

    My copy & paste skills are apparently lacking!!

    I assure you, that is not in my code!

    What IS in my code, however is:

    Code:
    <!-- This is where the results will go -->
    <div id='wrcontent'>
    	<center><img src = "../../../images/icon.png"></center>
    </div>
  4. #4  
    Assuming your directory structure is standard webOS stuff, you can actually just do:

    Code:
    <img src = "images/icon.png">
  5. #5  
    Quote Originally Posted by tont0r View Post
    Umm... I'd venture to guess that the problem is you are pointing to an image on a webpage (the precentral link you have there) and not on a local file system.

    Just a thought :P
    I'm pretty sure you can link things onto a webpage, and the Pre should be able to pull out images on the internet and display them no problem. Hence, WebOS and all...

    haha
  6. #6  
    the ../../ is the problem. the "relative root" of the app is the dir that index.html is in, not the scene's dir. so anything in images is just "images/imagename"
  7. #7  
    allow me to put that another way.... the scene's content are inserted by mojo INTO THE BODY OF INDEX.HTML ... the scene's -file- doesn't display, you're ALWAYS looking at index.html, which has new stuff inserted in it....

    so your relative links are always relative to IT.
  8.    #8  
    Quote Originally Posted by rboatright View Post
    allow me to put that another way.... the scene's content are inserted by mojo INTO THE BODY OF INDEX.HTML ... the scene's -file- doesn't display, you're ALWAYS looking at index.html, which has new stuff inserted in it....

    so your relative links are always relative to IT.
    Thanks!! I knew that but for whatever reason, didn't make that connection regarding the display of the graphic.

    In the words of Homer Simpson - DOH!!

Posting Permissions