+ Reply to Thread
Results 1 to 4 of 4

Thread: How to load responsive websites?

  1. #1
    Junior Member
    Join Date
    Aug 2012
    Posts
    15

    How to load responsive websites?

    Hi everyone,
    I am making an application which loads a webpage but what i have found is the form controls and not working i have used javascript functions to validate the fields but nothing is working what can be the problem.

    Code:
    import android.os.Bundle; 
    import android.webkit.WebView; 
    public class BrowserDemo1 extends Activity { 
    WebView browser; 
    @Override 
    public void onCreate(Bundle icicle) { 
    super.onCreate(icicle); 
    setContentView(R.layout.main); 
    browser=(WebView)findViewById(R.id.webkit); 
    browser.loadUrl("http://www.codeexperts.com"); 
    } 
    }

  2. #2
    Junior Member
    Join Date
    Aug 2012
    Posts
    16
    Hey i guess they may be a problem with javascript path in html file Let me know is everything working in browser on desktop.

  3. #3
    Junior Member
    Join Date
    Aug 2012
    Posts
    15
    Yes i can see the javascript calls on my desktop but not in android mobile.

  4. #4
    Junior Member
    Join Date
    Aug 2012
    Posts
    16
    You forgot to enable the javascript in browser by default javascript is off.so use this code snippet.

    Code:
    getSettings().setJavaScriptEnabled(true);

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts