Note that there are some explanatory texts on larger screens.

plurals
  1. PO.val() select text instead the value string when the webpage dinamically edits the source html
    text
    copied!<p>I have this html on a web page:</p> <pre><code>&lt;select name="chapter_select" class="chapter_select"&gt; &lt;option value="http://www.example.com/chapter/1"&gt;Chapter 1&lt;/option&gt; &lt;option value="http://www.example.com/chapter/2"&gt;Chapter 2&lt;/option&gt; &lt;option value="http://www.example.com/chapter/3"&gt;Chapter 3&lt;/option&gt; &lt;option value="http://www.example.com/chapter/4"&gt;Chapter 4&lt;/option&gt; &lt;option value="http://www.example.com/chapter/5"&gt;Chapter 5&lt;/option&gt; &lt;option value="http://www.example.com/chapter/6" selected="selected"&gt;Chapter 6&lt;/option&gt; &lt;/select&gt; </code></pre> <p>And this variables:</p> <pre><code>getInformationsFromCurrentPage : function(doc, curUrl, callback) { //This function runs in the DOM of the current consulted page var curChapName = $("select.chapter_select:first option:selected", doc).text(); var chapurl = $("select.chapter_select:first option:selected", doc).val(); callback({"name": name, "currentChapter": curChapName, "currentMangaURL": nameurl, "currentChapterURL": chapurl}); }, } </code></pre> <p>The problem is that both return the same text value. chapurl should return the url, not the text value. This was working until the website modified their site.</p> <p>I know that I'm going to be pretty picky but this is the manual for the development of the extension and the doc variable is a must <a href="http://www.allmangasreader.com/dev.php" rel="nofollow">http://www.allmangasreader.com/dev.php</a> just look out for the getInformationsFromCurrentPage function. It's using the jQuery 1.4.2 so maybe its that, the weird thing is that other sites just work as it.</p> <p>UPDATE: The server was using a script (rewriting the html) making me think that the dropdown list was on the top. I used some selectors to get the correct one following the source.</p>
 

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