Welcome to mootools!!!!  ;-)

You create an image tag like this (basic barebones image)

var myimg = new Element('img', {src:'/path/to/myimage.jpg'});

then insert it somewhere:

$('container').inject(myimg);

If you already have the img tag in the page, just want to change its
src attribute;

<img id="myimg" src="" />

$('myimg').setAttribute('src', 'path/to/newimage.jpg');




On Sat, Sep 27, 2008 at 4:24 PM, elvisparsley <[EMAIL PROTECTED]> wrote:
>
>
> I am a begginner, so please bear with me.
>
> I would like to insert myimg="images/shoe1_big.jpg" to img tag which
> generated dynamically. Is there any way I can do it with mootools?
>
> I tried this but I knew it won't work.
>
> document.getElementById("shop").getElementsByTagName("td")[2].getElementsByTagName("img")[0].myimg
> = "images/shoe1_big.jpg";
>
>
> Thanks in advance.
> --
> View this message in context: 
> http://n2.nabble.com/Is-there-any-way-I-can-insert-in-img-tag--tp1123375p1123375.html
> Sent from the MooTools Users mailing list archive at Nabble.com.
>



--
◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦
www.ivanicus.com

Reply via email to