Issues with displaying form via Javascript on a mobile device