OK, I'm making application for iPhone (Still learning, getting to know Objective-C and Xcode) and it's going pretty well. Application that I'm making is already made for Android. There is a part where application is opening "hardcoded" webpage for Android and that's part where I have problem. JavaScript on that webpage has part of the code that looks something like this:
<a onclick="Android.setCategory('US');" class="navigator_item cat_US">US</a>
That's the only thing I'm interested in. I would just like to GET that "onclick" part as a string for example. So, whenever that part is clicked, I want to get that as a string so I can do my own logic after that, call some method or anything. I tried using
shouldStartLoadWithRequest
but I wasn't able to log out anything on click. Am I doing something wrong here? Maybe my lack of javascript knowledge is problem and I don't understand basics, but I think it should be possible just to get that part from onclick quotes to string. That's all I need.
I forgot one very important thing. I CAN NOT TOUCH that javaScript, that is used for Android and that's how Android app works right now. That's why I want to do this "string" thing.
Is there anything I can do with stringByEvaluatingJavaScriptFromString and document.getElementsByClassName JavaScript method?
Cheers peps :)