-
15 Feb 2012 8:50 AM #1
Answered: <a href> in list items not working?
Answered: <a href> in list items not working?
Hi,
I would like to create a link for addresses within my list items. I have telephone numbers and emails working currently, but links for addresses do not work. Also, I created a "button" (which is just a linked image) to google maps. This doesn't work either. See attached image of a list item...
Screen Shot 2012-02-15 at 11.42.51 AM.jpg
I would like this button to open the Maps app on the iPhone. I know Sencha Touch has a map component, but we would like to use the native app for this. Right now I can't tap on the image whatsoever.
Any suggestions?
-
Best Answer Posted by mitchellsimoens
I opened up app.js of the list example in beta3 and updated the itemTpl to just show this:
Which shows a link for ever row. I can tap on that link and it will take me to sencha.comCode:itemTpl: '<div class="contact2"><a href="http://www.sencha.com">Test</a></div>',
-
15 Feb 2012 9:04 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,128
- Vote Rating
- 453
- Answers
- 3161
I opened up app.js of the list example in beta3 and updated the itemTpl to just show this:
Which shows a link for ever row. I can tap on that link and it will take me to sencha.comCode:itemTpl: '<div class="contact2"><a href="http://www.sencha.com">Test</a></div>',
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
15 Feb 2012 9:10 AM #3
Have you tried it on a device? Specifically and iPhone? When I run it in the browser it will work, but when I compile in Xcode and test in on the phone or in the simulator, it doesn't work.


Reply With Quote