Thanks
> Does anyone know if change you change the meta viewport settings via
> javascript? If so what would the command be?
Where the meta tag has id="viewport" as in:
<meta name="viewport" id="viewport" content="width=480" />
You could use:
document.getElementById('viewport').setAttribute('content',
'width=320');
I ran into some inconsistencies with this at iPhoneDevCamp last
weekend. For example, changing the width to a smaller value would zoom
the page in as expected, changing it to a larger value would not
automatically zoom you back out. I imagine you could get better
results by explicitly setting the scale and user-scalable values each
time, but haven't had a chance to fully flesh out the intricacies.
Cheers,
James Craig
BUT before you run it, note the following:
1. When the page first loads, the zoom IN and OUT buttons work fine
(by change the width and height).
2. Click the control panel button to modify the viewport settings,
then close, then click Apply changes.
3. Once you change the scale the zoom seem to break.
http://iPhoneDevcast.com/iPhone/ViewPortTest.asp
All: Feel free to grab the code and see what you guys can come up
with.
-=Ryan