Discussion Forums  >  Uncategorized

Replies: 8    Views: 342

Jordash Talon
Aspiring developer
Profile
Posts: 37
Reg: Oct 01, 2011
location unknow...
370
11/04/11 08:46 AM (14 years ago)

How to access local images via HTML

So I created a list item of Custom HTML - Text type and i'm trying to include some images into it. what should the src= be?
 
Jordash Talon
Aspiring developer
Profile
Posts: 37
Reg: Oct 01, 2011
location unknow...
370
like
11/04/11 08:48 AM (14 years ago)
Also is it possible to create a link to a menu from within HTML? e.g. (Click Here takes you to another menu in your app)
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/04/11 09:26 AM (14 years ago)
Hi @Jordash, All you need to do is make sure your images are in the BT_Images folder (and they can be in any subfolder you create there), and then reference them like this : <img src=image_name.jpg> Easy as that! Make sure there are no spaces in your image names, either in the folder, or in the HTML. And you do not have to reference the subfolder in your src= statement...BT is smart enough to find it wherever it may be located in BT_Images. Also...don't forget to add your images to your project as well, and not just to the folder itself (mostly applies to Xcode). As far as linking to another screen, if it's another HTML page, you would do a standard <a href=page_name.html>. If you want to link to a different app screen, then it's more difficult, but I think it can be done. Search the forums for more info. Thanks! Mark
 
Jordash Talon
Aspiring developer
Profile
Posts: 37
Reg: Oct 01, 2011
location unknow...
370
like
11/04/11 11:32 AM (14 years ago)
Oh ok, the image linking is way easy that's nice. I'll try and figure out how to interlink Menus via HTML, looks like a major pain, but that would be really handy to be able to do.
 
Parker @ buzztouch
buzztouch Evangelist
Profile
Posts: 1395
Reg: May 09, 2011
Pacific Grove, ...
24,500
like
11/04/11 12:15 PM (14 years ago)
Hi Jordash, To access a screen from a HTML page you'll have to trigger one of the iOS tap methods. So, you'll have to do something like this: http://davinccoder.wordpress.com/2011/06/28/call-ios-method-for-html-button-click/
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/04/11 01:24 PM (14 years ago)
 
Vali
buzztouch Evangelist
Profile
Posts: 193
Reg: May 22, 2011
Bucharest
5,830
like
11/05/11 07:01 AM (14 years ago)
Hi, I want to do a similar thing, but I need to use a RSS screen with an XML that I built. I need the XML as I have over 100 lines to add, multiplied by at least 5-6 times. The images will be in inside the app, not Online. So I will put them all in the BT_Images folder. Now I want the Link XML Element to point to an image inside the BT_Images folder. Is there a way to do this? Thanks a lot, Vali
 
Parker @ buzztouch
buzztouch Evangelist
Profile
Posts: 1395
Reg: May 09, 2011
Pacific Grove, ...
24,500
like
11/07/11 02:18 PM (14 years ago)
Hi Vali, I'm no XML expert but, I would try the method mentioned above by Mark (aka GoNorthWest) and try linking to them by file name. For example image12.png . One thing to consider if you are planning on embedding the images in the device itself, is that any changes/additions/subtractions to the images will result in you needing to recompile and re-submitting the app to the app store. You might save yourself some work by supplying the images with the XML feed itself.
 
Vali
buzztouch Evangelist
Profile
Posts: 193
Reg: May 22, 2011
Bucharest
5,830
like
11/07/11 02:57 PM (14 years ago)
Hi Parker, Thanks for your input. After working on the XML file I realized that I want my users to be able to search the text that leads to the image. So I will make a menu list for each category and put in there all the items/images. It is a tedious work, but I need it in this way. So the problem and solution will remain anyway for anybody who would like to tackle this option. BR, Vali
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.