alid
Posts: 0
Joined: Sat Aug 10, 2013 10:11 pm

iOS app- Why are the external links I have on buttons not working, and how do I fix that?

I have some buttons in my app that open links to external pages, but they are not working when I test it on my device.

I'm not a progammer, so I don't know where to look or what to do to fix this in X-code.

Can anyone help?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

iOS app- Why are the external links I have on buttons not working, and how do I fix that?

Hi Alid,

We need some time to test this. We'll get back to you with an update.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

iOS app- Why are the external links I have on buttons not working, and how do I fix that?

Hi, could you please post code you use on button Click?

alid
Posts: 0
Joined: Sat Aug 10, 2013 10:11 pm

iOS app- Why are the external links I have on buttons not working, and how do I fix that?

Here you go:

// screen elements handler
screen_3D8B_elementsEvents = resource_elementsEvents = function() {

Code: Select all

     $("a :input,a a,a fieldset label").live({ 
         click: function(event) { 
             event.stopPropagation(); 
         } 
     }); 

     $('#resource_mobilecontainer1 [name="mobilebutton_115"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=https://itunes.apple.com/us/app/leafsnap/id430649829?mt=8]https://itunes.apple.com/us/app/leafs...[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 
     $('#resource_mobilecontainer1 [name="mobilebutton_116"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=https://itunes.apple.com/us/app/moma/id383990455?mt=8]https://itunes.apple.com/us/app/moma/...[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 
     $('#resource_mobilecontainer1 [name="mobilebutton_117"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=https://itunes.apple.com/us/app/edmodo/id378352300?mt=8]https://itunes.apple.com/us/app/edmod...[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 
     $('#resource_mobilecontainer1 [name="mobilebutton_118"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=https://itunes.apple.com/us/app/brain-tutor-3d/id301362928?mt=8]https://itunes.apple.com/us/app/brain...[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 
     $('#resource_mobilecontainer1 [name="mobilebutton_119"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=https://itunes.apple.com/us/app/nps-national-mall/id447866739?mt=8]https://itunes.apple.com/us/app/nps-n...[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 

     $('#resource_mobilecontainer1 [name="mobilebutton_122"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=https://play.google.com/store/apps/details?id=com.lorencook.cookbook&hl=en]https://play.google.com/store/apps/de...[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 
     $('#resource_mobilecontainer1 [name="mobilebutton_123"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=https://play.google.com/store/apps/details?id=com.vialsoft.driversedfree&hl=en]https://play.google.com/store/apps/de...[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 
     $('#resource_mobilecontainer1 [name="mobilebutton_124"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=https://play.google.com/store/apps/details?id=com.gcspublishing.homebrewtalk&hl=en]https://play.google.com/store/apps/de...[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 
     $('#resource_mobilecontainer1 [name="mobilebutton_125"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=https://play.google.com/store/apps/details?id=com.conduit.app_5f3b348c8e5940ed94c64deaeb12d39f.app&hl=en]https://play.google.com/store/apps/de...[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 
     $('#resource_mobilecontainer1 [name="mobilebutton_126"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=https://play.google.com/store/apps/details?id=com.cube.arc.efa&hl=en]https://play.google.com/store/apps/de...[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 

     $('#resource_mobilecontainer1 [name="mobilebutton_58"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=http://www.w3.org/Mobile/]http://www.w3.org/Mobile/[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 
     $('#resource_mobilecontainer1 [name="mobilebutton_59"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=http://www.iamlearn.org]http://www.iamlearn.org[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 
     $('#resource_mobilecontainer1 [name="mobilebutton_60"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=http://www.astd.org]http://www.astd.org[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 
     $('#resource_mobilecontainer1 [name="mobilebutton_61"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=http://mitmobilelearning.org/]http://mitmobilelearning.org/[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 
     $('#resource_mobilecontainer1 [name="mobilebutton_131"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=http://www.londonmobilelearning.net]http://www.londonmobilelearning.net[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 

     $('#resource_mobilecontainer1 [name="mobilebutton_63"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=https://groups.google.com/forum/#!forum/mobile-learning-research]https://groups.google.com/forum/#!for...[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 
     $('#resource_mobilecontainer1 [name="mobilebutton_64"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=https://plus.google.com/s/mlearning/posts]https://plus.google.com/s/mlearning/p...[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 
     $('#resource_mobilecontainer1 [name="mobilebutton_65"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=http://www.linkedin.com/groups/Mobile-elearning-mlearning-mlearning-elearning-2074816]http://www.linkedin.com/groups/Mobile...[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     }); 
     $('#resource_mobilecontainer1 [name="mobilebutton_69"]').die().live({ 
         click: function() { 
             if (!$(this).attr('disabled')) { 
                 window.open('[url=https://twitter.com/search?q=%23mobilelearning&src=typd]https://twitter.com/search?q=%23mobil...[/url]', 'NewWindow', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); 

             } 
         }, 
     });
Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

iOS app- Why are the external links I have on buttons not working, and how do I fix that?

Hi Alid,

In window.open second parameter, try passing
code_system/codeinstead ofcodeNewWindow/code
For example:codewindow.open('https://twitter.com/search?q=...', '_system');/code

alid
Posts: 0
Joined: Sat Aug 10, 2013 10:11 pm

iOS app- Why are the external links I have on buttons not working, and how do I fix that?

I tried this - unfortunately it didn't work.

Should I just put the links in the html instead?

alid
Posts: 0
Joined: Sat Aug 10, 2013 10:11 pm

iOS app- Why are the external links I have on buttons not working, and how do I fix that?

I tried it with just HMTL and it works fine.

Not sure why the js isn't working, but as long as something works, I am happy.

Thanks for your help!

alid
Posts: 0
Joined: Sat Aug 10, 2013 10:11 pm

iOS app- Why are the external links I have on buttons not working, and how do I fix that?

FYI - I didn't have this js problem when I tested the andriod version of the app.

Return to “Issues”