Hello, recently, I made a proxy server... everything is going fine except, when I press enter on the text box, it will do nothing... this is my script
The story is:
1. User enter the url into the text box (for example www.google.com), and the URL will be rewritten as: "http://labnol-proxy-server.appspot.com/www.google.com" and then it will send it to the iFrame
2. the problem is, I want the text box to load just by pressing the Enter key. It is quite annoying to press the "GO" button each time to visit any website... so, what I want is I can press enter at the text box and it will load just like when I pressed the go button
<script>
function go(){
var L1 = document.theform.lastframe.value;
if (L1!= "#")
{
var url = "http://labnol-proxy-server.appspot.com/" + L1;
document.getElementById("lastframe").src = url;
}
}
</script>
<form name="theform">
<INPUT TYPE="text" name="lastframe" size="30" MAXLENGTH="30" onUnfocus="go()">
<input type="button" value="GO" onclick="go()"/>
</form>
<iframe name="lastframe" id="lastframe" SRC="http://labnol-proxy-server.appspot.com/www.google.com" width="100%" height="500" frameborder="0" marginwidth="0" marginheight="0" ></iframe>