<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Quote:Diego Calp wrote: in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108616#M71269</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Diego Calp wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Two options to try:&lt;/P&gt;

&lt;P&gt;parent.history.back();&lt;/P&gt;

&lt;P&gt;Instead the activate_subpage()&lt;/P&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;P&gt;Convert your admin button click code in a function and call it before the activate_subpage().&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Diego&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Both options are not working. I noticed that if I use&lt;/P&gt;

&lt;P&gt;$('#list').append(list_item);&lt;/P&gt;

&lt;P&gt;the css is working fine, but it keeps duplicating the list item everytime I repeat the process and the duplicated items have no css. I could not prevent append() from duplicate the item even if I use it outside the $.each(...)&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;$.each(vaga, function(index, item){
                        
    list_item = '&amp;lt;li class="widget uib_w_17" data-uib="jquery_mobile/listitem" data-ver="0" data-icon="carat-r" id="listitem"&amp;gt;&amp;lt;a href="javascript:ViewItem('+item.ID+');"&amp;gt;&amp;lt;span&amp;gt;'+item.CARGO+'&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';
                                                
});
                        
$('#list').append(list_item);
activate_subpage("#page_91_35");&lt;/PRE&gt;

&lt;P&gt;How could I check if #list is empty? If so, then the code would append list_item. This could be a way of doing that?&lt;/P&gt;</description>
    <pubDate>Wed, 04 May 2016 20:49:00 GMT</pubDate>
    <dc:creator>madson_g_</dc:creator>
    <dc:date>2016-05-04T20:49:00Z</dc:date>
    <item>
      <title>Problem with parseJSON</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108607#M71260</link>
      <description>&lt;P&gt;How do I pass data via ajax to php using a graphic button? It has its id and when I click on it, I want to select some database data according to its span (Admin).&lt;/P&gt;

&lt;PRE class="brush:xml;"&gt;&amp;lt;a class="uib-graphic-button default-graphic-sizing default-image-sizing hover-graphic-button 
active-graphic-button default-graphic-button default-graphic-text widget uib_w_10 d-margins 
media-button-text-bottom" data-uib="media/graphic_button" data-ver="0" id="admin"&amp;gt;
    &amp;lt;img src="images/administrativa.png"&amp;gt;
    &amp;lt;span class="uib-caption"&amp;gt;Admin&amp;lt;/span&amp;gt;
&amp;lt;/a&amp;gt;&lt;/PRE&gt;

&lt;P&gt;javascript:&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;$(document).on("click", "#admin", function(evt)
{
    /* your code goes here */

    var dataString = "admin=";
    var $server = "http://localhost/project";

    function SelectAdm(){
        $.ajax({
            type: "post",
            url: $server+"/select.php",
            data: dataString,
            success: function(result, jqXHR){

                var vaga = $.parseJSON(result);

                $.each(vaga, function(index, item){
                    var list_item = '&amp;lt;li class="widget uib_w_17" data-uib="jquery_mobile/listitem" data-ver="0" data-icon="carat-r" id="listitem"&amp;gt;&amp;lt;a href="#"&amp;gt;&amp;lt;span&amp;gt;'+item.CARGO+'&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;';

                    $("#list").append(list_item);
                    activate_page("#listpage");

                });

            },
            error: function(jqXHR, status){
                alert("not working");
            }
        });
    }
    new SelectAdm();
});&lt;/PRE&gt;

&lt;P&gt;php:&lt;/P&gt;

&lt;PRE class="brush:php;"&gt;&amp;lt;?php 

include_once("conn.php");

if(isset($_POST['admin'])){

$adm = "administrativa";

$sql = $mysqli-&amp;gt;query("SELECT * FROM vagas WHERE area = '".$adm."' ");

if($sql-&amp;gt;num_rows &amp;gt; 0){
    while($row = $sql-&amp;gt;fetch_array(MYSQL_BOTH)){
        $registro = array(
            "AREA" =&amp;gt; $row['area'],
            "CARGO" =&amp;gt; $row['cargo'],
            "ATIVIDADES" =&amp;gt; $row['atividades'],
            "SALARIO_INI" =&amp;gt; $row['salario_ini'],
            "POS_EXPERIENCIA" =&amp;gt; $row['pos_experiencia'],
            "BENEFICIOS" =&amp;gt; $row['beneficios'],
            "HORARIO" =&amp;gt; $row['horario'],
            "ESCOLARIDADE" =&amp;gt; $row['escolaridade'],
            "LOCAL" =&amp;gt; $row['local'],
            "INFOS_ADICIONAIS" =&amp;gt; $row['infos_adicionais']                      
        );

        $retorno[] = $registro;

    }       
}

$mysqli-&amp;gt;close();
$retorno = json_encode($retorno);
echo $retorno;

}

?&amp;gt;&lt;/PRE&gt;

&lt;P&gt;I used:&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;console.log(JSON.stringify(result));&lt;/PRE&gt;

&lt;P&gt;below success: function(result, jqXHR){&lt;/P&gt;

&lt;P&gt;and below: var vaga = $.parseJSON(result);&lt;/P&gt;

&lt;P&gt;Console returned to me "Unexpected end of input" or Undefined variable retorno on $retorno = json_encode($retorno);&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 21:54:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108607#M71260</guid>
      <dc:creator>madson_g_</dc:creator>
      <dc:date>2016-04-27T21:54:07Z</dc:date>
    </item>
    <item>
      <title>The issue is with your php</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108608#M71261</link>
      <description>&lt;P&gt;The issue is with your php script. Please correct that. We can only guide you with the client side issues related to XDK.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2016 01:08:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108608#M71261</guid>
      <dc:creator>Swati_S_Intel1</dc:creator>
      <dc:date>2016-04-28T01:08:27Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108609#M71262</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Seems to me that the url sent by ajax is&lt;/P&gt;

&lt;P&gt;&lt;CODE class="string" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: inherit !important; color: blue !important;"&gt;&lt;A href="http://localhost/project" style="font-family: Arial, 宋体, Tahoma, Helvetica, sans-serif; color: blue !important;"&gt;http://localhost/project&lt;/A&gt;/select.php?admin=&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT color="#0000ff" face="Consolas, Bitstream Vera Sans Mono, Courier New, Courier, monospace"&gt;And this way, this line in php will be false, because admin GET variable is empty&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE class="keyword" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-weight: bold !important; min-height: inherit !important; color: rgb(0, 102, 153) !important;"&gt;if&lt;/CODE&gt;&lt;CODE class="plain" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: inherit !important; color: rgb(0, 0, 0) !important;"&gt;(isset(&lt;/CODE&gt;&lt;CODE class="variable" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: inherit !important; color: rgb(170, 119, 0) !important;"&gt;$_POST&lt;/CODE&gt;&lt;CODE class="plain" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: inherit !important; color: rgb(0, 0, 0) !important;"&gt;[&lt;/CODE&gt;&lt;CODE class="string" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: inherit !important; color: blue !important;"&gt;'admin'&lt;/CODE&gt;&lt;CODE class="plain" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: inherit !important; color: rgb(0, 0, 0) !important;"&gt;])&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So the returned JSON will be an empty string.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Diego&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2016 11:54:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108609#M71262</guid>
      <dc:creator>Diego_Calp</dc:creator>
      <dc:date>2016-04-28T11:54:29Z</dc:date>
    </item>
    <item>
      <title>Quote:Diego Calp wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108610#M71263</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Diego Calp wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Seems to me that the url sent by ajax is&lt;/P&gt;

&lt;P&gt;&lt;A href="http://localhost/project" rel="nofollow"&gt;http://localhost/project&lt;/A&gt;/select.php?admin=&lt;/P&gt;

&lt;P&gt;And this way, this line in php will be false, because admin GET variable is empty&lt;/P&gt;

&lt;P&gt;if(isset($_POST['admin'])&lt;/P&gt;

&lt;P&gt;So the returned JSON will be an empty string.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Diego&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;How should I &lt;SPAN class="gt-card-ttl-txt" style="direction: ltr;"&gt;proceed&lt;/SPAN&gt;? How to click on Admin graphic button and get only results corresponding to it? Create a String var with admin value and pass it?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2016 21:31:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108610#M71263</guid>
      <dc:creator>madson_g_</dc:creator>
      <dc:date>2016-04-28T21:31:09Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108611#M71264</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Yes, could be as you saying.&lt;/P&gt;

&lt;P&gt;For example, if you click the Admin button the code in XDK could be something like:&lt;/P&gt;

&lt;P&gt;&lt;CODE class="spaces" style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: inherit !important;"&gt;&amp;nbsp;&lt;/CODE&gt;&lt;CODE class="keyword" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-weight: bold !important; min-height: inherit !important; color: rgb(0, 102, 153) !important;"&gt;var&lt;/CODE&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="plain" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: inherit !important; color: rgb(0, 0, 0) !important;"&gt;dataString =&amp;nbsp;&lt;/CODE&gt;&lt;CODE class="string" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: inherit !important; color: blue !important;"&gt;"admin=1"&lt;/CODE&gt;&lt;CODE class="plain" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: inherit !important; color: rgb(0, 0, 0) !important;"&gt;;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The php script is looking only if the POST variable has a value, but not what value. I don't know exactly how you want this to work, if you agree with the suggestion above, the line in php could be:&lt;/P&gt;

&lt;P&gt;&lt;CODE class="keyword" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-weight: bold !important; min-height: inherit !important; color: rgb(0, 102, 153) !important;"&gt;if&lt;/CODE&gt;&lt;CODE class="plain" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: inherit !important; color: rgb(0, 0, 0) !important;"&gt;(&lt;/CODE&gt;&lt;CODE class="variable" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: inherit !important; color: rgb(170, 119, 0) !important;"&gt;$_POST&lt;/CODE&gt;&lt;CODE class="plain" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: inherit !important; color: rgb(0, 0, 0) !important;"&gt;[&lt;/CODE&gt;&lt;CODE class="string" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: inherit !important; color: blue !important;"&gt;'admin'&lt;/CODE&gt;&lt;CODE class="plain" style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; background-image: none !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; min-height: inherit !important; color: rgb(0, 0, 0) !important;"&gt;]==1){&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This is the way to pass POST values, you can read it on your php and process it.&lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Diego&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2016 23:38:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108611#M71264</guid>
      <dc:creator>Diego_Calp</dc:creator>
      <dc:date>2016-04-28T23:38:43Z</dc:date>
    </item>
    <item>
      <title>I was doing right. My php was</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108612#M71265</link>
      <description>&lt;P&gt;I was doing right. My php was fine too. The problem was the text accents inside database table. After that I list the data on a listview. When I press the back button on header to repeat the process, my list item is losing its css. It shows just a common link. Why is this happening? Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2016 17:26:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108612#M71265</guid>
      <dc:creator>madson_g_</dc:creator>
      <dc:date>2016-05-02T17:26:00Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108613#M71266</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Which is the code of the back button? Or is just a link to the former page?&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;Diego&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 13:17:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108613#M71266</guid>
      <dc:creator>Diego_Calp</dc:creator>
      <dc:date>2016-05-03T13:17:26Z</dc:date>
    </item>
    <item>
      <title>I use activate_subpage(). If</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108614#M71267</link>
      <description>&lt;P&gt;I use activate_subpage(). If I use activate_page() it shows me a blank page. It´s weird because some time ago when I pointed to the page main id it was really fine.&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;$(document).on("click", "#listpage_back_btn", function(evt)
    {
         /*global activate_subpage */
         activate_subpage("#page_74_57");
         
    });&lt;/PRE&gt;

&lt;P&gt;I tried to .empty() the list before loading it but I get a blank page.&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 19:27:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108614#M71267</guid>
      <dc:creator>madson_g_</dc:creator>
      <dc:date>2016-05-03T19:27:13Z</dc:date>
    </item>
    <item>
      <title>Two options to try:</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108615#M71268</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Two options to try:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;parent.history.back();&lt;/P&gt;

&lt;P&gt;Instead the activate_subpage()&lt;/P&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;P&gt;Convert your admin button click code in a function and call it before the activate_subpage().&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Diego&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 20:48:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108615#M71268</guid>
      <dc:creator>Diego_Calp</dc:creator>
      <dc:date>2016-05-03T20:48:39Z</dc:date>
    </item>
    <item>
      <title>Quote:Diego Calp wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108616#M71269</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Diego Calp wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Two options to try:&lt;/P&gt;

&lt;P&gt;parent.history.back();&lt;/P&gt;

&lt;P&gt;Instead the activate_subpage()&lt;/P&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;P&gt;Convert your admin button click code in a function and call it before the activate_subpage().&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Diego&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Both options are not working. I noticed that if I use&lt;/P&gt;

&lt;P&gt;$('#list').append(list_item);&lt;/P&gt;

&lt;P&gt;the css is working fine, but it keeps duplicating the list item everytime I repeat the process and the duplicated items have no css. I could not prevent append() from duplicate the item even if I use it outside the $.each(...)&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;$.each(vaga, function(index, item){
                        
    list_item = '&amp;lt;li class="widget uib_w_17" data-uib="jquery_mobile/listitem" data-ver="0" data-icon="carat-r" id="listitem"&amp;gt;&amp;lt;a href="javascript:ViewItem('+item.ID+');"&amp;gt;&amp;lt;span&amp;gt;'+item.CARGO+'&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;';
                                                
});
                        
$('#list').append(list_item);
activate_subpage("#page_91_35");&lt;/PRE&gt;

&lt;P&gt;How could I check if #list is empty? If so, then the code would append list_item. This could be a way of doing that?&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 20:49:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108616#M71269</guid>
      <dc:creator>madson_g_</dc:creator>
      <dc:date>2016-05-04T20:49:00Z</dc:date>
    </item>
    <item>
      <title>Quote:madson g. wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108617#M71270</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; -webkit-text-size-adjust: 100%;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;madson g. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;I was doing right. My php was fine too. The problem was the text accents inside database table. After that I list the data on a listview. When I press the back button on header to repeat the process, my list item is losing its css. It shows just a common link. Why is this happening? Thanks in advance.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;It seems to be a framework problem. I changed from jquery to bootstrap and it worked as it should.&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2016 01:21:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-parseJSON/m-p/1108617#M71270</guid>
      <dc:creator>madson_g_</dc:creator>
      <dc:date>2016-05-10T01:21:59Z</dc:date>
    </item>
  </channel>
</rss>

