fix for FF

This commit is contained in:
Robohash 2011-07-08 13:58:10 -04:00
parent 5eff864398
commit 40171dfe70

View File

@ -206,17 +206,17 @@ document.onkeypress = stopRKey;
</script> </script>
<form name="textform" action=""> <form id="textform" action="">
<p>Enter any text, and press 'generate': </p><input type='text' name='query' onKeyPress=”return disableEnterKey(event) /> <p>Enter any text, and press 'generate': </p><input type='text' name='query' onKeyPress=”return disableEnterKey(event) />
<a href="#" onclick="return submitform();"> generate</a> <a href="#" onclick="submitform();"> generate</a>
</form> </form>
<script type="text/javascript"> <script type="text/javascript">
function submitform() function submitform()
{ {
var x = document.getElementById("idimg"); var x = document.getElementById("idimg");
x.setAttribute("src", "http://static1.robohash.com/" + textform.query.value ); x.setAttribute("src", "http://static1.robohash.com/" + document.getElementById("textform").query.value );
var y = document.getElementById("YourIP"); var y = document.getElementById("YourIP");
y.innerHTML = "http://static1.robohash.com/" + textform.query.value; y.innerHTML = "http://static1.robohash.com/" + document.getElementById("textform").query.value;
} }
</script> </script>