Set script tag contents

Set script tag contents

I'd like to set a script tag content dinamically. The primefaces generate the code below:

  1. <script id="tabView:formEstrutura:lotacoesPesquisadas_s" type="text/javascript">$(function(){PrimeFaces.cw("DataTable","widget_tabView_formEstrutura_lotacoesPesquisadas",{id:"tabView:formEstrutura:lotacoesPesquisadas",
  2. widgetVar:"widget_tabView_formEstrutura_lotacoesPesquisadas",
  3. selectionMode:"single",scrollable:true,liveScroll:false,scrollStep:0,
  4. scrollLimit:0,scrollHeight:"107"});});
  5. </script>                                    

Attempt to the final of the script (",scrollHeight:"107"). I'd like to change this script using JQuery in order to use a runtime calculated scrollHeight. I try to use:

  1.  $("#lotacoesPesquisadas_s").text("<new script code here>");

but it doesn't work. Any sugestions ?

thanks,

Ruben