ios - Capturing information from a UIWebView -


I have a UIWebView in my app that parses HTML from a server and it My challenge is that this is a checklist in HTML, and I would like to occupy the time the user checks and unchecks the next time I load the same HTML.

Anyway click on the checkbox to capture?

How can this be done?

The JavaScript will be used with the help of several steps.

  1. Add the listener to the document for the event ' CheckboxStat Change .
  2. The target ID of the event is the check ID of the checkbox that you want if you capture the value in a JS variable.
  3. Now load the iframe with a specific URL prefix myevent: // checkbox? Id: value
  4. If your IFrame is full then your web view will trigger shouldStartLoadWithRequest method You can check the URL scheme from the requested object. If it is "myevent" then you can parse the URL string to store the appropriate value.
  5. The next time the page loads, you can set the values ​​by javascript with that value injected.

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -