Hi Sam,

thank you for your kind replies. Regrettably, I feel I need to ask back
again. 
I tried several versions of this code (without success)

for (var i=0; i<3;i++) {   // there are up to 3 images
  var img = document.createElement('img');                      // new image
to include in webpage
      img.id = 'greasemonkey :)';
      img.src = (unsafeWindow.images[i]);                         // here I
copy the url (?)
      var Foo = document.getElementById('main_image');   // here I want to
insert the stuff
      Foo.parentNode.insertBefore(img, Foo);                    // and put
it in ...
};

For some reason, exactly nothing happens in the code if I inspect it. If I
remove the loop and 
replace the img.src var by a fixed string the insertion (last 2 lines) does
work, so the critical 
point might still be the img.src = (unsafeWindow.images[i]);  line?

Thanks, Bernard
-- 
View this message in context: 
http://old.nabble.com/Need-help-with-script-tp29972889p29988511.html
Sent from the GreaseMonkey List mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to