Reputation: 503
I have a script
<html><head><title>File Upload Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="" content=0; url="/home.html" target="link"/>
<style>
* {box-sizing: border-box;}
body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}
.topnav {
overflow: hidden;
background-color: #e9e9e9;
}
.topnav a {
float: left;
display: block;
color: black;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: #ddd;
color: black;
}
.topnav a.active {
background-color: #2196F3;
color: white;
}
.topnav input[type=text] {
float: right;
padding: 6px;
margin-top: 8px;
margin-right: 16px;
border: none;
font-size: 17px;
}
@media screen and (max-width: 600px) {
.topnav a, .topnav input[type=text] {
float: none;
display: block;
text-align: left;
width: 100%;
margin: 0;
padding: 14px;
}
.topnav input[type=text] {
border: 1px solid #ccc;
}
}
</style>
</head>
<div class="topnav">
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfg7ZkS0TSeBbgfM4nqJCsBr-Yl3Dmrwy8UD_cXK68zYIhwjg/viewform" target="link">Upload File to Server</a>
<!-- <a href="#">Some text...</a> -->
</div>
<iframe name="link" width="100%" height="95%" frameborder="0"></iframe>
<body></html>
And what I want to do is make the redirect <meta http-equiv="" content="0; url="/home.html" target="link"/>
be able to change the iframe. If I do http-equiv="refresh"
, it just makes it reload infinitely. I have another file, home.html
<h1>Home</h1>
and I don't know how to make it autoload home.html in the iframe element. Is there a workaround, or am I just doing it wrong? If you could help, that would be greatly appreciated! :)
Upvotes: 0
Views: 732
Reputation: 397
First off, close content="0;
with a " and get rid of the semi-colon. Besides that, your question is not totally clear, but it looks like you're trying to redirect using a meta tag. I don't understand why, read this on how to redirect using JavaScript.
Upvotes: 0