I'm trying to create a chrome extension that allows two URL's to be inputted into one tab. I break it up with frameset
into left and right. Here's the code:
Background.html
<!DOCTYPE html>
<html>
<head>
<title>A frame with two pages</title>
</head>
<frameset cols="*,*">
<frame src="left.html" name="left">
<frame src="right.html" name="right">
</frameset>
</html>
Left and Right
<!DOCTYPE html>
<html>
<body onLoad="document.getElementById('urlToJump').value='http://www.foxnews.com/'">
<div class="menu">
<form>
<br>
<input type="text" id="urlToJump">
<br>
// Test 1 (custom input)
<input type="button" id="restore" value="Go to the URL above" onclick="window.location.href=document.getElementById('urlToJump').value;" />
<br>
// Test 2 (calling function)
<input type="button" value="Load new document" onclick="newDoc()">
</form>
</div>
<script>
function newDoc() {
window.location.assign("http://www.w3schools.com")
}
</script>
</body>
</html>
Both tests didn't work, as neither loaded the intended target. How can this be resolved? I'm trying to recreate the Chrome extension found here, and add more to it. Thanks!