<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.23543"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=984454018-19122013><FONT color=#0000ff 
size=2 face=Arial>Hi Shiv,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=984454018-19122013><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=984454018-19122013><FONT color=#0000ff 
size=2 face=Arial>your code should work, but </FONT></SPAN><SPAN 
class=984454018-19122013><FONT color=#0000ff size=2 face=Arial>is your sld valid 
xml and </FONT></SPAN><SPAN class=984454018-19122013><FONT color=#0000ff size=2 
face=Arial>is the named layer correct?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=984454018-19122013><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=984454018-19122013><FONT color=#0000ff 
size=2 face=Arial>If you request a MapServer layer, then in the mapfile sld must 
be enabled.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=984454018-19122013><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=984454018-19122013><FONT color=#0000ff 
size=2 face=Arial>Arnd</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=984454018-19122013><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=984454018-19122013><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV><BR>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>Von:</B> openlayers-users-bounces@lists.osgeo.org 
[mailto:openlayers-users-bounces@lists.osgeo.org] <B>Im Auftrag von </B>shiva 
subramanya<BR><B>Gesendet:</B> Mittwoch, 18. Dezember 2013 14:46<BR><B>An:</B> 
openlayers-users<BR><B>Betreff:</B> [OpenLayers-Users] changing sld's 
dynamically just not working<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>
<DIV>
<DIV>
<DIV>
<DIV>
<DIV>
<DIV>Hi<BR><BR></DIV>I want to change SLD's dynamically on my map for the WMS 
layers with the following code. <BR><BR>  
         var sldfile = '<A 
href="http://myserver/resources/sld/test.sld">http://myserver/resources/sld/test.sld</A>';<BR>          
layer.mergeNewParams({sld: sldfile,SLD_BODY: null});<BR><BR></DIV>But the map 
refreshes when i execute this and the styles dont change. <BR><BR></DIV>I 
checked the accessibility of the sld url and it is accessible on the 
network.<BR><BR></DIV>I need some help to make this 
work.<BR><BR></DIV>Thanks<BR><BR></DIV>Shiv<BR></DIV></BODY></HTML>