jasonknight
5th June 2010, 11:25
Hi,
I have my webView connected to a linkClicked handler. It's only meant to surf local pages, and I do some special magic behind the scenes etc.
When you click links, it works fine, but when you click a form submit button, it does not. It loads the page, but not through the click handler.
What I would like to do is hijack the button click in a non-hackish way, grab out all of the POST or GET variables and pump them into a JS object on the targeted page.
Now, I know some hackish ways to accomplish this, and they would be pretty straightforward, I am just wondering, is there an easy/robust webkit way to hijack submit button clicks, yank get/post vars, and kill the network access and just manually load the content?
I have been reading the NetworkAccessManager and Reply docs, and have found one or two blog posts claiming something similar, but not exact is possible. Unfortunately, I can't figure out how to do it.
Essentially, I don't fully understand what is happening with the button click, so some insight would be totally awesome!
Many thanks,
Jason
I have my webView connected to a linkClicked handler. It's only meant to surf local pages, and I do some special magic behind the scenes etc.
When you click links, it works fine, but when you click a form submit button, it does not. It loads the page, but not through the click handler.
What I would like to do is hijack the button click in a non-hackish way, grab out all of the POST or GET variables and pump them into a JS object on the targeted page.
Now, I know some hackish ways to accomplish this, and they would be pretty straightforward, I am just wondering, is there an easy/robust webkit way to hijack submit button clicks, yank get/post vars, and kill the network access and just manually load the content?
I have been reading the NetworkAccessManager and Reply docs, and have found one or two blog posts claiming something similar, but not exact is possible. Unfortunately, I can't figure out how to do it.
Essentially, I don't fully understand what is happening with the button click, so some insight would be totally awesome!
Many thanks,
Jason