3

I have created an application that links to another site, this site has a form (and some javascript in the background)

Due to whatever javascript the page has on any Android 2.2-2.3 device tapping on an Input field does not bring up the soft keyboard and when you force it up you are unable to input anything at all.

My ICS device works perfectly fine with the site (I'm guessing due to the updated mobile browser)

Is there any code I can add to my project that will allow the older 2.2 and 2.3 devices to properly run the javascript or be able to handle the websites input fields correctly?

Here is the site I'm having the issues with: http://fhsdschools.revtrak.net/tek9.asp?pg=products&grp=1

3
  • Can you post the link to the site? Commented Sep 12, 2012 at 22:19
  • Done. fhsdschools.revtrak.net/tek9.asp?pg=products&grp=1 Commented Sep 12, 2012 at 22:23
  • My best guess is that it is an Android error. If so, there is nothing to do:( Commented Sep 16, 2012 at 7:25

3 Answers 3

1

I faced a similar issue with web view. There is some issue with the focus when we enable the java script. I tried redirecting the focus on touch and the issue was solved. This is what i did:

wv.requestFocus(View.FOCUS_DOWN);
        wv.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                switch (event.getAction()) {
                case MotionEvent.ACTION_DOWN:
                case MotionEvent.ACTION_UP:
                    if (!v.hasFocus()) {
                        v.requestFocus();
                    }
                    break;
                }
                return false;
            }
        });

I hope this will help.

Sign up to request clarification or add additional context in comments.

4 Comments

It's not a problem with the webview having focus, you can easily replicate my issue just by opening the default browser and navigating to the page I'm having issues with.
have you tried adding this code snippet to your web view. It worked for me.
I was surprised this worked.. sort of a hackish method but I'll take it lol. Thanks man.
you are welcome...I was also surprised when this worked but was happy cause I had a deadline for submitting the project :P
0

If ur javascript is enabled and and your have enabled session cookies but still you are not able to enter into the edittext then your current browser doesn't support the script running on that page. Try installing some other internet browser and check if it helps. I dont think adding any code snippet to the project is going to help.

Comments

0

Is all of that Javascript really necessary? For such a static webpage, it certainly has a rather large amount of obscure javascript. Maybe the jQuery loaded function is failing, and causing the browser to error out. It is kinda just doing a smash-and-grab tactic with the browser's features until it figures out what works and what doesn't.

Also, use the developer console: https://android.stackexchange.com/questions/5999/android-browsers-aboutdebug-what-do-those-settings-do

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.