Email Screen Width and Height

[Total: 0    Average: 0/5]

This creates a form that the user would use to send their screen dimensions.

Body Code:

<script language="javascript"> 
function res()
{ 
  document.form.w.value=screen.width; 
  document.form.h.value=screen.height; 
  document.form.w2.value=screen.width; 
} 

function fixIt()
{  
  var _subj=document.form.w.value+"x"+document.form.h.value; 
  document.form.action+="?subject="+_subj;
}
</script> 

<form action="mailto:someone@somewhere.com" method="post" name="form"  onSubmit="res();fixIt();"> 
<input type="hidden" name="w"> 
<input type="hidden" name="h"> 
<input type="text" name="w2"> 
<input type="submit"> 
</form> 

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *