Screen Button on iPad with code - javascript

I am trying to make a button that will allow me to screenshot my image on an iPad, then attach it to an e-mail. I am not developing an app, so I cannot use Objective C or UI code. I was hoping there was a way to this with Javascript or JQuery.
Basically I made a widget that you can draw in for an iBook. I want to add a button that when pressed will take a screenshot of the iPad Canvas, then attach it into an e-mail.
Any insight is greatly appreciated!

Here you can find three way to take a screenshot of the browser's viewport using jQuery:
http://www.jquerybyexample.net/2013/08/take-webpage-screenshot-html5-jquery-javascript.html

Related

How to use mobiscroller *instead of* input?

I'm want to use the mobiscroll selector (demo | source) on my (desktop oriented) website. I've got a basic version working here. The way that works is that when you click the input at the top, it loads the (enormously sexy) spinner as an overlay with a dark layer over the rest of the site (try it out).
What I would rather have instead of this behaviour though, is that on my desktop website it shows this spinner instead of the input. So not as an overlay, but integrated with the rest of the design without needing to click to bring it up. That way the user is saved one click and it is immediately clear what's expected of him or her.
Does anybody know how I would be able to use this spinner instead of the input, so that it integrates nicely with the rest of my page instead of working as some sort of pop-up/overlay?
All tips are welcome!
You can use it display: 'modal' on mobile and use it in display: 'inline' on desktop. You'll find more info about the display option that you can pass on init in the documentation.
Now you just need to detect if your users are browsing from a mobile device or a desktop. You have a couple of options there, this would be one approach.

Google Swiffy iPad Button double click issue

I have recently converted some flash files to HTML5 using the google swiffy converter. These files are working great within a desktop browser but when it comes to testing on an iPad i am having some issues.
The problem I am having is with buttons. My buttons are showing up correctly however when you tap on them they are just being highlighted and not actually calling the click event. If i then click the highlighted button again the click event fires.
Is there any way to solve this problem as it is very frustrating.
I found out what the problem was with this.
The way that the buttons were created was that they were Movie Clips, if i changed them to be buttons and then exported and converted the buttons started working properly.

Accesing softkeyboard buttons with Phonegap

i have developped a mobile app with dojo and phonegap for android. The problem is, that I want to acces the bottom right corner button. I want to change its name to "send" and I want to connect the button with a function. Does anyone have an idea how to do that? Using javascript, or how to do that natively?
Natively it is possible to change the text to certain other limited options however I doubt whether it is possible to do from the context of a PhoneGap app.
Check this post which details the process of doing relatively same but in native.
Android - Handle "Enter" in an EditText
For more detail you need to check the doc

For my website, is it possible to create a button where users can click on it to create an ICON on their iPhone desktop?

User clicks the button, and an icon is added to the iPhone desktop.
If possible, can I activate this button manually?
There is no way for you to do this, because otherwise every developer would do this by invoking it with an automated script and then everyone would just be annoyed. You will have to direct users to press the + sign and then Add to Home Screen.
I believe this is not possible. However a common approach is to detect whether running in an iPhone browser (not as an HTML app) and show a huge arrow pointing at the + sign.
You can take a look at this tool, which is a nice JavaScript snippet giving the user a hint on how to add your homepage as a Icon on your homescreen:
http://cubiq.org/add-to-home-screen
For a live demo visit this page with your iOS-device:
http://cubiq.org/dropbox/a2h/examples/simple/

How to implement the functionality of autoscrolling page if the element is below page fold in javascript?

I want to implement a similar functionality like Template Monster's menu. I am trying to create a feature list which slides down when the user clicks on the feature. But if the link is at the bottom of the page and the user clicks on that link, the feature list is shown below the view area and the user doesn't know that it is open until he manually scrolls the browser window down.
I want to incorporate a functionality that if the feature list is not in the viewable area, the browser window automatically scrolls down to show the full list (templatemonster.com has done so with their drop down menus).
Can anybody help me?
Thanks,
Gaurav
The website which you reference is using the Prototype JavaScript framework with Scriptaculous for it's visual effects. These libraries make this sort of task much easier as there are built in controls to achieve, more or less, exactly what you want.
If you want something to slide down when a user clicks on it; you should be thinking about the event click and effect slide down Check out the demo in the manual for this.
The second aspect of scrolling can be achieved using these libraries too. Again, checkout the demo in the manual for this too. Essentially, you need to use an anchor tag to mark the point on the page where the feature exists, and then use the scrollto effect to take you to that poision on the page.
Hope this sets you on the right path.

Categories