> > Hello all,
> > I'm developing a web page using TW and I was wondering if is it
> > possible to do an iPhoneMarkupPreHead that
> > only loads when the device is an iPhone.

Whenever you *save* a TiddlyWiki document, the contents of
MarkupPreHead (and other Markup* tiddlers) are copied directly into
the TiddlyWiki source document, so that they will be automatically
processed by the browser when it loads the document.

Note that this processing occurs BEFORE the 'onLoad' event is
triggered, so NONE of the TiddlyWiki code has been invoked yet.  As a
consequence, you cannot use TiddlyWiki syntax within a Markup tiddler.

However, *ALL* the normal browser-based syntax (HTML/CSS/Javascript)
can be used (including <script>...</script> blocks -- which are not
natively supported by TiddlyWiki unless you add
http://www.TiddlyTools.com/#InlineJavascriptPlugin)

Thus, to conditionalize the loading of MarkupPreHead content, you
should be able to use some Javascript to check the browser's
navigator.userAgent variable and then only invoke the remainder of the
content if the desired browser is detected.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to