views:

197

answers:

1

I have a simple UIWebView with simple HTML. At the end I place a javascript function:

<script language='javascript' type='text/javascript'>
var x = document.getElementById('SEARCHRESULT');
if (x != null) x.scrollIntoView(true);}
</script>

To force the view to scroll to a region. It doesn't seem to work.

Does the UIWebView not support this simple javascript?

+1  A: 

You seem to have a "}" without matching "{" at the end of the second line. If this is also the case in the code you're actually using, the javascript will not be executed because of this syntax error.

sth
ah, yes that is a bit silly... good eye.
BahaiResearch.com