I think it's not you but the server layer who's causing the error 
(assuming that you refer to 'jpl_wms' layer). If you replace 'landsat7' 
layer with 'overview' layer you'll notice that there's no error, just a 
blank image, which means that even the server is OK but not is the 
layer. You would try with another WMS server<br>
<br clear="all">Best regards,<br><br>Xurxo Méndez Pérez<br><br><a href="http://www.sonxurxo.com/" target="_blank">http://www.sonxurxo.com</a><br>
<br><br><div class="gmail_quote">2010/10/28 Malik Shahzad <span dir="ltr">&lt;<a href="mailto:malik.rsgis@gmail.com">malik.rsgis@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="gmail_quote">Dear I am new to Open layers and need some information.<div><br></div><div>I am trying to add some WMS layers but failed to do :( I am following one tutorial and write following code.</div><div><br>

</div><div><br></div><div><div>&lt;html&gt;</div><div><span style="white-space: pre-wrap;">        </span>&lt;head&gt;</div><div><span style="white-space: pre-wrap;">                </span>&lt;title&gt;OpenLayers Example&lt;/title&gt;</div>
<div><span style="white-space: pre-wrap;">                        </span>&lt;script src=&quot;<a href="http://openlayers.org/api/OpenLayers.js" target="_blank">http://openlayers.org/api/OpenLayers.js</a>&quot;&gt;&lt;/script&gt;</div><div><span style="white-space: pre-wrap;">                        </span>&lt;script defer=&quot;defer&quot; type=&quot;text/javascript&quot;&gt;</div>

<div><span style="white-space: pre-wrap;">        </span>function init()</div><div><span style="white-space: pre-wrap;">        </span>{</div><div><span style="white-space: pre-wrap;">                </span>var map = new OpenLayers.Map(&#39;map&#39;);</div>

<div><span style="white-space: pre-wrap;">                </span>var wms = new OpenLayers.Layer .WMS( &quot;OpenLayers WMS&quot;,</div><div><span style="white-space: pre-wrap;">                </span>&quot;<a href="http://labs.metacarta.com/wms/vmap0" target="_blank">http://labs.metacarta.com/wms/vmap0</a>&quot;,</div>

<div><span style="white-space: pre-wrap;">                </span>{layers: &#39;basic&#39;}</div><div><span style="white-space: pre-wrap;">                </span>);</div><div><span style="white-space: pre-wrap;">        </span>map.addLayer (wms);</div>
<div><span style="white-space: pre-wrap;">        </span>map.zoomToMaxExtent();</div><div><br></div><div><span style="white-space: pre-wrap;">        </span>var lon = 100.4;</div><div><span style="white-space: pre-wrap;">        </span>var lat = 13.1;</div>

<div><span style="white-space: pre-wrap;">        </span>var zoom = 5;</div><div><span style="white-space: pre-wrap;">        </span>map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);</div><div><br></div>
<div><br></div><div><span style="white-space: pre-wrap;">        </span>map.addControl( new OpenLayers.Control.LayerSwitcher() );</div><div><br></div><div><span style="white-space: pre-wrap;">        </span>var jpl_wms = new OpenLayers.Layer.WMS( &quot;NASA Global Mosaic&quot;,</div>

<div><span style="white-space: pre-wrap;">        </span>&quot;<a href="http://t1.hypercube.telascience.org/cgi-bin/landsat7" target="_blank">http://t1.hypercube.telascience.org/cgi-bin/landsat7</a>&quot; ,</div><div><span style="white-space: pre-wrap;">        </span>{layers: &quot;landsat7&quot;}</div>

<div><span style="white-space: pre-wrap;">        </span>);</div><div><span style="white-space: pre-wrap;">        </span>map.addLayer(jpl_wms);</div><div><span style="white-space: pre-wrap;">        </span>}</div>
<div><br></div><div><span style="white-space: pre-wrap;">                </span>&lt;/script&gt;</div><div><span style="white-space: pre-wrap;">        </span>&lt;/head&gt;</div><div><br></div><div>&lt;body onload=init()&gt;</div>
<div><br></div><div>&lt;div style=&quot;width: 800px; height: 475px&quot; id=&quot;map&quot;&gt;</div><div><br></div><div>Hello My Map</div><div><br></div><div>&lt;/div&gt;</div><div>&lt;/body&gt;</div><div>&lt;/html&gt;</div>

</div><div><br></div><div><br></div><div><br></div><div><br></div>
<div>waiting for your kind response.</div><div>Malik</div>
</div><br>
<br>_______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@lists.osgeo.org">Dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-dev</a><br>
<br></blockquote></div><br>