Question

When I attach an HTML file to an email and then email it to my iphone, I can view the file perfectly. However, none of the javascript in the file seems to run - not even simple stuff like showing / hiding divs triggered by "onClick" events.

Is there any way to make javascript run on attached files in the iphone mail application?

Was it helpful?

Solution

JavaScripts is supported in MobileSafari browser but not in the mail.

I think that to run JavaScript in the way you want you'd have to open the website in the browser. Cannot think of any other way of doing it.

OTHER TIPS

No. Like just about every e-mail client still in existence, JavaScript etc. will be blocked.

Including JS code may actually prevent your e-mails from being delivered - <script> tags will likely raise a warning flag in most anti-spam filters.

You can probably get some of the interactivity you want using CSS, though. It's tricky because elements never get :hover, but you can attach behavior to :target and :active states to get some pretty compelling interactivity that does work in Mail on the iPhone, iPad, and Mac Mail. (People who read their mail inside gmail will have all this coolness stripped out, however.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top