I have loaded an html file in a webkit view inside my app. The html file acts like a search engine and has the following code which gets triggered when the users hits the search action:
function search() {
var input = document.getElementById("search_form_input_homepage").value;
window.open("https://duckduckgo.com/?q=" + input);
}
However, I need the result url to open in Safari. As of now, window.open loads up the url in the default browser. How do I achieve this?
I found this link that talks about different url schemes in Safari. But I am very new to JavaScript. This is in fact the first time I am working with JS. So I could not understand how to implement this. Can anybody help me with this, please?