-1
I’m creating an Electron application where I have a field that the person inserts a url
and when she clicks on the submit
is directed to that url
.
My html is like this:
<body>
<form id="formulario">
<div>
<input type="text" value="Insert your URL" id="campo">
<input onclick=Start() type="submit" value="Start">
</div>
</form>
</body>
Clicking pulls a function in the document config.js
:
function Start() {
var InsertUrl = document.getElementById('campo').value;
console.log(InsertUrl)
window.location.href = + InsertUrl
}
The value of url
is being printed in the console.log
, I just can’t pull the url
into the window.location.href
.
window.location.href =
+
InsertUrl
this + is left there– Bacco