Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery find() does work on Chrome and Firefox but not IE
    primarykey
    data
    text
    <p>this is the response I get from a web service for a submitted Url.</p> <pre><code>HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=UTF-8 Content-Language: en-US Transfer-Encoding: chunked Date: Sun, 20 May 2012 15:35:52 GMT Connection: close 841 &lt;!--?xml version="1.0" encoding="UTF-8"?--&gt; &lt;doi_records&gt; &lt;doi_record owner="10.1016" timestamp="2012-04-21 12:08:25"&gt; &lt;crossref&gt; &lt;journal&gt; &lt;journal_metadata language="en"&gt; &lt;full_title&gt;Procedia - Social and Behavioral Sciences&lt;/full_title&gt; &lt;abbrev_title&gt;Procedia - Social and Behavioral Sciences&lt;/abbrev_title&gt; &lt;issn media_type="print"&gt;18770428&lt;/issn&gt; &lt;/journal_metadata&gt; &lt;journal_issue&gt; &lt;publication_date media_type="print"&gt; &lt;month&gt;1&lt;/month&gt; &lt;year&gt;2011&lt;/year&gt; &lt;/publication_date&gt; &lt;journal_volume&gt; &lt;volume&gt;15&lt;/volume&gt; &lt;/journal_volume&gt; &lt;special_numbering&gt;C&lt;/special_numbering&gt; &lt;/journal_issue&gt; &lt;journal_article publication_type="full_text"&gt; &lt;titles&gt; &lt;title&gt;The effect of teaching the cognitive and meta-cognitive strategies (self-instruction procedure) on verbal math problem-solving performance of primary school students with verbal problem- solving difficulties&lt;/title&gt; &lt;/titles&gt; &lt;contributors&gt; &lt;person_name contributor_role="author" sequence="first"&gt; &lt;given_name&gt;Narges&lt;/given_name&gt; &lt;surname&gt;Babakhani&lt;/surname&gt; &lt;/person_name&gt; &lt;/contributors&gt; &lt;publication_date media_type="print"&gt; &lt;month&gt;1&lt;/month&gt; &lt;year&gt;2011&lt;/year&gt; &lt;/publication_date&gt; &lt;pages&gt; &lt;first_page&gt;563&lt;/first_page&gt; &lt;last_page&gt;570&lt;/last_page&gt; &lt;/pages&gt; &lt;publisher_item&gt; &lt;item_number item_number_type="sequence-number"&gt;S1877042811003211&lt;/item_number&gt; &lt;identifier id_type="pii"&gt;S1877042811003211&lt;/identifier&gt; &lt;/publisher_item&gt; &lt;doi_data&gt; &lt;doi&gt;10.1016/j.sbspro.2011.03.142&lt;/doi&gt; &lt;resource&gt;http://linkinghub.elsevier.com/retrieve/pii/S1877042811003211&lt;/resource&gt; &lt;/doi_data&gt; &lt;/journal_article&gt; &lt;/journal&gt; &lt;/crossref&gt; &lt;/doi_record&gt; &lt;/doi_records&gt; 0 </code></pre> <p>user inputs a inputs a variable is a form and clicks on a <code>&lt;button&gt;</code>, ajax call triggers and gets above data. then depending on the returned xml appropriate action should be done. this is what I am doing:</p> <pre><code>&lt;script type="text/javascript"&gt; ... if ($('input:text[name=ident]').val() != "") { $.post("&lt;?php echo site_url('con/met/') ?&gt;", {doi:$('input:text[name=ident]').val()}, function(responseText){ parseXmlDoi(responseText)}, "html" ); ... } &lt;/script&gt; </code></pre> <p>and here is my parseXmlDoi function:</p> <pre><code>function parseXmlDoi(xml) { $('#debug').fadeIn(); $('#debug').html(''); if ($(xml).find('error').text()) { $('#debug').html('&lt;div dir="rtl" class=\"message warning\"&gt;&lt;p&gt;error&lt;/p&gt;&lt;/div&gt;'); } else if ($(xml).find('book').text()) { $('#debug').html('&lt;div dir="rtl" class=\"message info\"&gt;&lt;p&gt;this is a book&lt;/p&gt;&lt;/div&gt;'); } else if ($(xml).find('journal').text()) { // do some stuff } else { $('#debug').html('&lt;div dir="rtl" class=\"message error\"&gt;&lt;p&gt; something is wrong&lt;/p&gt;&lt;/div&gt;'); } } </code></pre> <p>the problem: in Chrome and Firefox based on given above Xml, it works and it executes <code>// do some stuff</code> but at IE it says <code>something is wrong</code> it means that the <code>find()</code> is not working.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload