2 Replies Latest reply on Dec 31, 2010 1:38 PM by nbelaevski

    cannot handle JSON data

    orkun

      hello

       

      I cannot handle data when I follow this way.

      ~~~~~~~~~~~~

      <a4j:commandButton value="Google Haritasında Göster"
      action="#{haritaBean1.google_true}" data="#{haritaBean1.jeoboundary}"
      style="height: 27px; width:160px;  font-size: 10px; font-weight: bolder"
      oncomplete="showGoogleJeo(data)"> </a4j:commandButton>

      ~~~~~~~~~~~~~~~


      function showGoogleJeo(data) {

      alert(data);        // OK
      var myObj = eval("("+ data +")");    ??? Is it wrong
      alert(myObj);               //NO RESPONSE there must be an error ?

      alert(myObj.coordinates[0]);
      alert('Finished showGoogleJeo'); return true; } 

       

       

      I will appreciate if you answer

       

      regards