Discussion Forums  >  WebViews and HTML for Mobile

Replies: 3    Views: 104

MrT
Aspiring developer
Profile
Posts: 81
Reg: Jan 21, 2013
Dallas
3,010
06/17/13 04:13 PM (10 years ago)

Is there simple html code to detect images for iPhone vs. iPad

So this is my question: is there code that allows you to designate larger images for display on the iPad and smaller ones for the iPhone? Put another way, is there code that detects whether an app is being displayed on iPhone or iPad and displays photos accordingly?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/17/13 04:27 PM (10 years ago)
With HTML? no. Within HTML using Javascript? yes. http://www.javascriptkit.com/howto/newtech3.shtml This will detect screen size; resizing elements is up to you. Cheers! -- Smug
 
MrT
Aspiring developer
Profile
Posts: 81
Reg: Jan 21, 2013
Dallas
3,010
like
06/17/13 09:34 PM (10 years ago)
Thanks. I'll give this a try.
 
MrT
Aspiring developer
Profile
Posts: 81
Reg: Jan 21, 2013
Dallas
3,010
like
06/20/13 10:15 AM (10 years ago)
Just closing the loop on this one....this earlier thread provided some code that works for what i'm trying to do. http://www.buzztouch.com/forum/thread.php?tid=F239B426DCE06775975CF5A&fid=5FE1FB2355A48AD674A6CA3&sortColumn=FT.id&sortUpDown=DESC&currentPage=5
 

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.