Reputation: 81
Advanced thank you for the answers. I have a iOS uibutton function
- (IBAction)sendVIN:(id)sender
{}
When i click this button the ReceiveVin javascript function has to be called and vin number variable has to be passed as parameters to that function present inside the webpage.
<script>
function ReceiveVin(vin)
{
document.getElementById('vinnumber').value = vin;
}
</script>
This is an online website an can be found at this link "http://tk14.webng.com/autofunds.html"
I cannot use webview for this functionality.
Upvotes: 0
Views: 67
Reputation: 4257
You can use UIWebView's - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script
method. An example
[webView stringByEvaluatingJavaScriptFromString:@"document.getElementById('vinnumber').value = vin"];
Upvotes: 1