<div>Hi, i&#39;m also new to openlayers but i found out how to print maps by looking at the examples in the openlayers examples, check the BASIC SINGLE WMS EXAMPLE code, for what i understand there are a few steps u must follow: </div>

<div>1) include in ur site the OpenLayers,js file</div>
<div><span><font color="#0000ff">&lt;</font><span><font color="#800000">script</font></span><font color="#0000ff"> </font><span><font color="#ff0000">src</font></span><font color="#0000ff">=<span>&quot;../lib/OpenLayers.js&quot;</span>&gt;</font></span><span><font color="#0000ff">&lt;/</font><span><font color="#800000">script</font></span><font color="#0000ff">&gt;</font></span><br>
</div>
<div>2)in javascript define map and layer variables</div>
<div><span><font color="#0000ff">var</font></span> map, layer;<br></div>
<div>3)define init function which can change depending on what u want to do</div>
<div> <span><font color="#0000ff">function</font></span> init(){<br>   ..........</div>
<div>  }</div>
<div> 4)make the body event &quot;onload&quot; calls init function</div>
<div><span><font color="#0000ff">&lt;</font><span><font color="#800000">body</font></span><font color="#0000ff"> </font><span><font color="#ff0000">onload</font></span><font color="#0000ff">=<span>&quot;init()&quot;</span>&gt;</font></span><br>
5)create a div with &quot;map&quot; id</div>
<div><span><font color="#0000ff">&lt;</font><span><font color="#800000">div</font></span><font color="#0000ff"> </font><span><font color="#ff0000">id</font></span><font color="#0000ff">=<span>&quot;map&quot;</span> </font><span><font color="#ff0000">class</font></span><font color="#0000ff">=<span>&quot;smallmap&quot;</span>&gt;</font></span><span><font color="#0000ff">&lt;/</font><span><font color="#800000">div</font></span><font color="#0000ff">&gt;</font></span><br>
</div><br><br>
<div class="gmail_quote">2011/3/25 Gagan Suri <span dir="ltr">&lt;<a href="mailto:gagan.suri@gmail.com">gagan.suri@gmail.com</a>&gt;</span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">S Shadab &lt;shadab2k8@...&gt; writes:<br><br>hi shadab,<br>did u get the solution to this problem. I am also having the same task at hand.<br>
And I am new to openlayers and javascript.<br>Also the backend code that we are using in java and not php as mentioned in the<br>post.Any help would be highly appreciated.<br>Thanks,<br>Gagan<br><br>_______________________________________________<br>
Users mailing list<br><a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</blockquote></div><br>