Sponsors

 
Showing posts with label Javascript Developement. Show all posts
Showing posts with label Javascript Developement. Show all posts

Tuesday, October 16, 2007

Mobile Safari Changes for 1.1.1

Ok, I've been finding alot of useful stuff that Apple did for iPhone 1.1.1 that will help use developers alot! Instead of listing each change in a seperate post, I decided in this post to give you a bulleted run-down that I captured after going through the online documentation that Apple has. Let's look at the new features:
  • For the viewport meta tag there are two new constants available for you to use:
    device-width
    device-height
    for more info on using them go to this page here and this page here.
  • The next item doesn't explicitly say that its for 1.1.1, but I've never seen it before. Over on Google Groups, one question has come up on how to keep Safari from creating a phone hyperlink on a number that it thinks is a phone number but is not a phone numer! Introducing the meta tag:
    format-detection
    for information on how to use this meta tag, go to this page.
  • Here's another item not linked explicitly to 1.1.1, linking to a youTube video. Saw some questions in the Google Groups on this. Here is a page that gives you the syntax.
  • So you have an input form on your web page. And you don't like how mobile Safari either auto-corrects the user's spelling or auto-capitalizes. Or, maybe you want to make sure that one or both of these things happen during text input. iPhone 1.1.1 adds two new attributes you can use on an input tag to address this problem:
    autocorrect
    autocapitalize
    How to use these attributes...
  • Read some interesting information on one-finger events. What interests me here is the mention of a working onscroll event.
  • Alright, we know that the onresize event doesn't work properly on the iPhone. Well iPhone 1.1.1 introduces the onorientationchange event to use in your body tag. Why they just didn't make onresize work is beyond me. But at least now we can check this without using setTimeout hacks! More information on this event. Oh yes, here you will find out that they added a new property to the window object: orientation. So, in your event handling routine you can check window.orientation for a value and decide what to do. Cool! Hey it returns the angle in degrees how the user re-oriented their iPhone! Doubly cool!
  • You might want to check out this list of Supported Events for the iPhone as of 1.1.1.
  • There is a new debugging console built into Safari for 1.1.1.

Well, that is about it. I know they made some CSS changes too but what precisely I do not know. But hey! All this stuff I've bulleted is very good stuff! All you web app developers for the iPhone / iTouch: enjoy!

Thursday, October 4, 2007

iPhone Development Speculations on arstechnica.com

This article definitely has got my developer mouth watering. I hope that what it's saying is all true. This will rock!

Apple is working on solutions that will help developers get more face time on the iPhone, but there are currently no plans to offer a "true" iPhone SDK that would allow developers to create native apps, a source at Apple has told Ars.

The company is currently planning a handful of updates to Safari and the iPhone that may appease some of the common complaints about developing for the device. For example, Apple is currently jamming on adding offline storage capabilities... to read more click here to read the actual article.

Thursday, September 6, 2007

Discovery: Javascript Variables Need Declaring

I've been working on this iPhone App... which had been rolling along nicely.

Then... after adding a few lines of code, it stopped working (what I had gotten done so far anyway).

Narrowed it down to this line:

sCurrPanelCode = sID;

"Weird!" I thought. So I used a try/catch on this line with a message box.

The message returned: "Can't find variable: sID"

I would have assumed if I hadn't declared it it would have created it automatically and returned "NaN".

Nope! Just keep a weather eye out for this one mates!

Friday, August 31, 2007

YUI Theatre: Interesting Stuff for Javascript Developers

In the previous post which shows a video where Joe Hewitt talks about his iUI javascript/CSS plugin, at the end of the video there was a URL that was displayed. I went there and...

There looks to be alot of goodness here that developers can benefit from. I'm going to camp out on this page for awhile and see what I can learn.

The URL?

http://developer.yahoo.com/yui/theater/

If the Yahoo!Video links on the page don't work (due probably to a firewall) try right-clicking on the download.yahoo.com link and saving the Target.

Another neat thing is that these MV4 files are iPhone compatible. I wouldn't try downloading them over EDGE though!

NOTE:
After downloading the MV4 file to your PC, you might notice that if you double click on it, it doesn't know which program to use to open it with. I think if you have iTunes installed this probably is not a problem. I've got to check this. You still can open it though... in the Quicktime viewer. Of course Quicktime needs to be installed on your PC.

  • Open Quicktime.
  • Pick File/Open and browse to the spot on your PC where yous saved the MV4 file.
  • Change the File of type to the setting All Files (*.*)
  • Pick your file and click the Play button!