1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    3
    Vote Rating
    0
    dave1909 is on a distinguished road

      0  

    Default Unanswered: Cannot navigate through pages using a tap event on images

    Unanswered: Cannot navigate through pages using a tap event on images


    Hi,
    I am developing a demo app using sencha framework for iphone and ipad just for learning purpose. The problem is, I am not able to navigate from one html page to another using href on images in mobile safari, but the same is working for normal desktop browsers. I also tried to use a tap event for images but was not successful. I am posting the code and my main aim is to navigate to the second page when I click on the image..

    Ext.require([
    'Ext.Container', 'Ext.Button'
    ]);

    Ext.application({
    name: 'NotesApp',
    onReady:function(){
    Ext.create('Ext.Panel', {
    fullscreen: true,
    scroll: 'vertical',
    cls:'purplefont',
    items: [

    {

    items:[
    {layout:'hbox',cls:'pad6',

    items:[
    {flex:1},
    {html:'<a href="finddoctor.html"><img src="images/doctor_icon.png"></img><p >Find Doctors</p></a>',cls:'image1',flex:1},

    {html:'<a href="findhospital.html"><img src="images/hospital.png"></img><p >Find hospitals</p></a>',cls:'image1',flex:1},

    {html:'<a href="#"><img src="images/pharmacy_cross.png"></img><p>Find Pharmacies</p></a>',cls:'image1',flex:1},

    {flex:1}
    ]
    }
    ]
    }
    This code is working properly in desktop browsers but in a mobile browser only text is acting as a hyperlink, I just need to navigate through images. I know I am skipping something basic but would appreciate your help in this.

    Thanks in advance..

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,532
    Vote Rating
    871
    Answers
    3564
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Please post into the appropriate forum, I have moved this to the Sencha Touch 2 Q&A forum. Also, please wrap your code in the code tags.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    3
    Vote Rating
    0
    dave1909 is on a distinguished road

      0  

    Default


    Sorry.. just joined the forum, will take care of these in future. Can you please help me out with this?

  4. #4
    Sencha User
    Join Date
    Jan 2012
    Posts
    3
    Vote Rating
    0
    dave1909 is on a distinguished road

      0  

    Default


    Got it.. Used an id tag with the image with a proper event handler for a tap. Now the problem that I am facing is image scaling while opening the same page in iphone. In iPad resolution is good but in iphone images are getting overlapped. Can anyone tell me what to do in this case?

Thread Participants: 1