Unable to perform javascript functions on Rails mobile site - javascript

I have a existing website in rails 2.3.8 which i want to develop for mobile phones(andriod,iphone), something like facebook's mobile site.
I found that creating the view pages with extension .mobile.erb will do the job.
But the problem is i am unable to call existing javascript functions on mobile site which i used for the main site.
I want to know if it is possible to call js or is there any alternative way.

Of course, you can use javascript on you mobile web pages. For iOS and Android. For other mobile i don't know.
Doc for safari ios : http://developer.apple.com/devcenter/safari/index.action

For iPhone you can use the iUI framework http://code.google.com/p/iui/ which consists of a JavaScript library, and CSS similar to that of native iOS apps.

Related

Is there an easy way to get Android UI elements in an HTML page?

I'm developing a prototype of an Android app in HTML/CSS/JS, so that I can experiment with the UX of the app.
As a part of that I want to be able to style HTML elements as Android elements and (preferably) have them behave as if they're native Android UI elements.
Is there a JavaScript or CSS library that will do this for me? I've Googled, but nothing has come up.
I would recommend to take a look at the following Frameworks and Browserplugins. Maybe you will decide afterwards to regret using the native android toolkit at all, because it can be a big advantage to develop the application platform independent using HTML5 and Javascript techniques. Than later, if you want to port it to another platform you won't have to change a lot / almost nothing on the code base.
Phonegap
Ripple Browser Plugin (Phone Emulator)
JQuery Mobile
which is completely themeable: Jquery native android theme
The whole thing can finaly look like the following:
jpHolo

Port Javascript application on Windows/iOS/Android etc

I have developed a small JavaScript game and I'd like to extend it outside webbrowser, making desktop and mobile versions available. What is the best way to do so reutilizing existing JavaScript code?
My answer is to make use of Phonegap. See the PhoneGap documentation. It supports the mobile Platforms.

Common code base for HTML5/CSS/JS webapp and native app

I have been asked to create a webapp and native apps using HTML5/CSS/JS.
I should make some research, but i remember I heard about PhoneGap.
My basic question is this:
if i write a HTML5/CSS/JS that somehow interacts with a server backend (through webservices for example), this is a web application that a user can reach with a browser (or mobile browser) at a specific IP addresss.
If I "phonegap" the same code do I obtain an Android od iOS application that is already working or is there some more work in between? IF there is some more work this is not clear to me.
I am aware this is a generical question, anyway it is a programming question because I need to know if going for this single code base is an option or not.
Thanks!
I have recently built a hybrid web application using the same codebase that had to work on all major desktop browsers (down to IE8), mobile browsers and be installed as a "native-like" app on iOS and Android. For this I used jQuery Mobile and PhoneGap Build.
You can only use HTML, CSS and JavaScript for PhoneGap applications, so any data being retrieved from the server needs to be done via AJAX, but it works just fine.

jqGrid alternate for Mobile apps

Is there any thing similar to jqGrid available for Mobile applications ?
Could someone please suggest a javascript plugin that I can use with RhoMobile platform ?
jqgrid works without issues in Mobile devices. You should use it
Rhodes (RhoMobile's client application framework) applications are built in Ruby (for your "server-side" business logic) and HTML (for your views.) The applications are rendered in a native web-view on the device. Therefore, the application you write is limited only by the web-view of the device that it is running on.

How do I leverage my knowledge of Html/JS/CSS for iOs, Android, etc?

Is it possible to create responsive, mobile-style apps without coding directly for iOS or Android with the same html/js/css stack that is used for major browsers?
Have a look at these books, they really helped me get started with developing for mobile using web technologies:
Building Android Apps with HTML, CSS, and JavaScript
Building iPhone Apps with HTML, CSS, and JavaScript
As others have said you can make a web app styled for mobile. There are some nice framworks to help you with styling and things like nice animated swipes etc. I would recommend looking at jQuery Mobile and Sencha Touch.
For sencha there is a list of getting started resources in my answer to another stackoverflow question here.
If you you want to make your web app native (and have access to features like the camera and accelerometer) I would recommend PhoneGap, but there are other frameworks already mentioned like Titanium.
Phonegap can be used along with Sencha Touch or jQueryMobile and has lots of resources to help get you started e.g. the API docs and getting started guide (check out the phonegap website for others)
Hope that helps!!
Yeah, it's called Web App.
You're probably goin to use some touch/mobile library like jQuery Mobile or Sencha Touch to make the user interaction easier and fancy.
You don't need to code on C/Java to put out someting great for mobiles. ;)
On top of that you can also use PhoneGap to create the complete "native" look and feel, without writing any code in Java/Objective-C.
#Jason if you have Good Knowledge in java scrip then i prefer to you to start with Appcelerator Titanium Click Here Link For and Link two This will good For Developing Application for iphone and android platform .There are lot Tutorial you can find for both android and iphone.

Categories