Note that there are some explanatory texts on larger screens.

plurals
  1. POAdd search box for getting started search box
    text
    copied!<p>I want to add a search box for getting started example (Hello, World) on chrom extensions <a href="http://code.google.com/chrome/extensions/getstarted.html" rel="nofollow">http://code.google.com/chrome/extensions/getstarted.html</a>, I was able to add a search box so I can change the word/s are used to get different thumbnails ("text=hello%20world").</p> <p>The problem I faced is how to refresh the contents with a new thumbnails, for ex.:</p> <p>If I want to search for word jerusalem and click go button the contents (thumbnails) will be updated with a new thumbnails for jerusalem</p> <p>Do I need to use AJAX? Please explain.</p> <p>Thanx for any help.</p> <p>==================== I included jquery in popup.html </p> <p>Inside showPhotos() function I did the following:</p> <pre><code>function showPhotos() { //Remove previous thumbs if any for (var i = document.images.length; i-- &gt; 0;) document.body.removeChild(document.images[i]); var photos = req.responseXML.getElementsByTagName("photo"); for (var i = 0, photo; photo = photos[i]; i++) { var img = document.createElement("image"); var span = document.createElement("span"); var span1 = document.createElement("span"); $(span1).attr('id', 'innerSpan'); $(span1).attr('style', 'text-align:center;color:#ffffff;'); $(span1).addClass('tooltip black bottom center w100 slide-up'); $(span1).html('&lt;i&gt;' + photo.getAttribute("title") + '&lt;/i&gt;'); $(span).addClass('savytip'); $(span).attr('id', 'outerSpan'); $(img).attr('src', constructImageURL(photo)); $(span1).appendTo(span); $(img).appendTo(span); $(span).appendTo('body'); }} </code></pre> <p>The extension just work for the first time and the go button stop responding, where is the wrong in my code?</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