Run HTML scripts in Cocoa-Touch? - html

Is there a way to run HTML scripts in an iOS application? I want to send an email using a script when a UISwitch us on, because I have to send encoded data that I do not want the user to accidentally modify. I have an option in my app preferences that will allow users to send debugging data to me so I can fix the app, kind of like what Adobe did in their mobile Photoshop app. The best way I can think of doing this is to use the HTML script below:
Also, will my app be rejected if I include that?

Take a look at MFMailComposeViewController: http://developer.apple.com/library/ios/documentation/MessageUI/Reference/MFMailComposeViewController_class/Reference/Reference.html
And send your debug data an attachment (addAttachmentData:mimeType:fileName:) so the user can't modify it. The user can't modify attachments, only delete them, so warn the user to not delete the attachment.
Using an HTML link like that will still open the mail app and let the user edit the message before sending.

Related

Is there any way to send a message to email in html

I am making a form right now and i have a bit of a problem. HTML doesn`t support mail-sendings without a downloaded email program. But is there maybe a way to not just send an email but send a message instead that can be converted to email? Is there any service out there that supports this idea? I know that PHP would be the solution, but i only have access to a HTML/CSS only server. Please help me out.
You could try using an iframe for this. But you would still have to get a php file. However, you will have to host it from somewhere else. Maybe google drive? Or smth like that.
Not as far as I know, but if the website user has Gmail binded to the "mailto:" protocol there's no need for an installed software, it will redirect him/her to Gmail with the email address of the recipient already filled in

getting information from a website in processing?

I am currently making a processing program, where a part of it will be to acess some information from at website. The website will be an HTML file, where some information is stored, which i need to acess and parse. I know how to open a html file, but my problem is that it is supposed to acess a list, which is generated after a login on the website. How do i do that?
This is the website, right after loading the HTML file:
http://i.imgur.com/kGIkyle.png
After a login, the website will begin to spit out data every two seconds.
I wanna acess the data in the ordered list, and i wanna acess it every two seconds in my processing program. How do i do that?
This is the website, after a login, after a moment.
http://i.imgur.com/O743fNJ.png
When you use a web browser to submit a login, you're really interacting with the server. Usually the web browser submits a POST request containing the login information (like a username and password), and the server responds with the next webpage to load.
The details of this are going to depend on the website you're interacting with. Some websites might use AJAX to submit the data and then trigger some JavaScript to run.
The point is, you're going to have to understand exactly how the underlying web server and webpage works. Then you're going to have to use the rules of those interactions to issue the appropriate requests from your Processing code.
It might be as simple as submitting the login credentials in the url itself and then just scraping the information from the webpage.
More likely, you're going to have to interact with some kind of web API and do the requests yourself. Google "Java post request" for more info.
Of course, all of this assumes that the website is open to people using it. If this website isn't yours, it could also be locked down and unavailable to you.

Can you write an extension into the email / messaging app?

Is it possible to "plug-in" or create an extension to the email app on Windows Phone? The way the user would interact with it is that during the creation or reading of a message my tool would be another option on the New or Read message command bar? Essentially I would like to extend the functionality of the mail app. I don't see any other way at this point other than creating a brand new email application for the phone.
No. The best you can do is to use the share contract in your application and send some information to the Email app. Once it opens up, you won't be able to "plug" any behavior.
Have a look in this and this MSDN articles.

Submit an app with In App modules

I am a newbie in Windows Store Apps development. I have created an app which has some In-App purchase modules. I am testing this with locally created WindowsStoreProxy.xml file, However to test in app purchases, I updated this xml manually and added these modules in ListingInformation and LicenseInformation tags. If I don't do this my app throws KeyNotFoundException which is usual. Now my issue is, after submitting the app to the app store how will testers test these in-app purchases? Its very serious, because It may cause to App Rejection. Please suggest.
On the Store dashboard, you'll fill out the in-app purchase details before you submit. All that info will then be in the Store database when the testers get your app.
To be specific, when uploading your app you'll take whatever information you've been using from WindowsStoreProxy.xml and paste it into the app description page. If you want to see what this looks like, go ahead and create an app package now, and then upload to the dashboard. This will then allow you do go to the description page where you can see what will be required. Just make sure to upload a new package before you complete the submission.
Also be sure to change CurrentAppSimulator to CurrentApp (you'll fail cert quickly if you forget).

Copy/Paste in JavaScript?

I know this question was asked like a million times by now, but I couldn't really find a good up-to-date solution.
I've implemented my own menu to provide the user the ability to Cut, Copy and Paste into my WebApp.
But I'm not sure how to actually work with the clipboard on Firefox, IE, Safari/Chrome.
Thank you for your help.
I just wrote a detailed technical blog post on this very subject (I work for Lucidchart and we recently did an overhaul on our clipboard). Included in the post is this fiddle which is a working example of copying and pasting via Javascript.
The good news is that this example gives you working code for setting/getting any supported clipboard data types whenever the user uses a clipboard hotkey.
The bad news is that using your own context menu to copy and paste is problematic. Even Google can't get around this (try using context-menu copy or paste in Google Docs in Firefox). You'll be able to get it to work without too much trouble in IE. This is because you can access the clipboardData object at anytime from Javascript via:
window.clipboardData
(When you attempt to do this outside of a system cut, copy, or paste event, however, IE will prompt the user to grant the web application clipboard permission.)
In Chrome, you can create a chrome extension that will give your web app clipboard permissions (this is what we do for Lucidchart). Then for users with your extension installed you'll just need to fire the system event yourself when they click the menu option:
document.execCommand('copy');
It looks like Firefox has some options that allow users to grant permissions to certain sites to access the clipboard, but I haven't tried any of these personally.
did u try :
http://ericphan.info/development/cross-browser-copy-and-paste-with-jquery-copy/
UPDATE:
the link is not available so i copy the content from cache :
The Scenario
I was working on a client project for SSW when the client reported a bug in the web app.
The bug involved a dynamically generated mailto link that got updated when you selected multiple employees. The client was reporting an error when he selected more than 10 employees to email. His Lotus Notes mail client popped up an error saying:
Error processing command line arguments
Testing this myself I found that Outlook 2007 could easily support the emails of 30-40 employees before the mailto link stopped working.
The Cause
It turns out that the mailto spec has a limit and the mail clients also have a limit. Lotus Notes only handles 240 characters in the mailto link and other modern mail clients like Outlook 2007 support the 2083 characters - the max length of a URL
This explains the discrepancy in testing.
The fix - JQuery to the rescue
Since this is a limitation of the HTML spec we needed another solution to meet the client’s requirement of “I want to be able to select multiple employees and send an email to all of them”
We could have created an email form that used SMTP to send out the email - but the client wanted to use Lotus Notes as his mail client.
We ended up changing the “email” button to copy all the emails (comma separated) onto the clipboard and popped open a new email window. All the client had to do was hit CTRL + V and paste the emails into the TO field. This was the quickest and most cost effective solution that gave the client the flexibility to use their own email client.
There is a JQuery plugin called jquery.copy that provided cross browser copy and paste by using a flash (swf) file. This is similar to how the syntax highlighter on my blog works.
Once you reference the jquery.copy.js file all you need to do to push data into the clipboard is run the following:
$.copy("some text to copy");
Nice and easy ;)
Note: you may need to change the path the the SWF file in jquery.copy.js to get this to work