# Testing connections

**URL:** <https://forum.kirupa.com/t/testing-connections/269880>\
**Category:** web dev\
**Created:** [September 2, 2008, 6:40pm UTC](https://forum.kirupa.com/t/testing-connections/269880 "2008-09-02T18:40:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![philsbury](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@philsbury](https://forum.kirupa.com/u/philsbury)\
**Post date:** [September 2, 2008, 6:40pm UTC](https://forum.kirupa.com/t/testing-connections/269880/1 "2008-09-02T18:40:26Z")

</div>

Hi, is it possible to test a users internet connection using javascript?  
Here’s the situation, I have an html page which has a form in it. I want to hide the form if the user is not connected to the internet, so that a user can’t try and submit the form and finish up with a ‘Page cannot be displayed’ message.

The reason being is that the project is to go on a CD, so it rules out any server side scripting.

I thought i may be possible to swap the content in, a little like swfObject does this flash.

Anyone any ideas?
