What you are asking for is not precisely possible. You cannot put an html file inside of a text input (well, you can but, the result would not be pretty). So, the question becomes what effect are you trying to achieve? Forget about technical terms for the moment. What do you want the page to look like and what (if anything) do you want to have happen when it loads? What to you want to have happen as the user interacts with it?
Just for kicks I messed around with this idea a bit sometime yesterday. This is not meant to be a solution for you, just something to check out and play with if you like:
Code:
<html>
<head>
<title>Random Link Rotator</title>
<script type="text/javascript">
function randLink(){
var blip, rlink, r=Math.random()*100
if (r>=25&&r<50)
rlink='<a href="home.html">Home</a>'
else if (r>=50&&r<75)
rlink='<a href="downloads.html">Downloads</a>'
else if (r>=75)
rlink='<a href="sitemap.html">Site Map</a>'
else
rlink='<a href="index.html">Index</a>'
crossObj=document.all? document.all.rdiv : document.getElementById('rdiv')
blip=crossObj.innerHTML.toString()
blip=blip.substr(blip.lastIndexOf('"'))
if (rlink.toLowerCase().substr(rlink.lastIndexOf('"'))!==blip.toLowerCase())
crossObj.innerHTML=rlink
else
randLink()
}
</script>
</head>
<body>
<div id="rdiv"><a href="index.html">Index</a></div><br>
<span>Click Below to Generate a Random Link</span><br>
<input type="button" value="Random Link" onclick="randLink()">
</body>
</html>
Bookmarks