Results 1 to 4 of 4

Thread: Remove White Background

  1. #1
    Join Date
    Jun 2012
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Remove White Background

    1) Script Title: swiss army knife

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...army/index.htm

    3) Describe problem: images have a white background, i want to remove this so that background is transparent.
    Thanks

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    change shown in red
    Code:
    inter_slide.prototype.populateslide=function(picobj, picidx){
    if(document.getElementsByTagName){
    if(picobj.getElementsByTagName('a')[0]&&picobj.getElementsByTagName('a')[0].onclick)
    picobj.getElementsByTagName('a')[0].onclick=null;
    if(picobj.getElementsByTagName('img')[0]&&picobj.getElementsByTagName('img')[0].onload)
    picobj.getElementsByTagName('img')[0].onload=null;
    }
    picobj.style.backgroundColor=this.imgs[picidx].fadecolor? this.imgs[picidx].fadecolor : this.fadecolor? this.fadecolor : 'transparent';
    var slideHTML='<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"><tr><td width="100%" height="100%" align="center" valign="middle" style="background:transparent none;">'
    if (this.imgs[picidx][2]){ //if associated link exists for img
    var specs=this.imgs[picidx][4]? ", '"+this.imgs[picidx][4]+"'" : this.specs? ", '"+this.specs+"'" : '';
    slideHTML+='<a href="'+this.imgs[picidx][2]+'"'+(this.imgs[picidx][3]? ' target="'+this.imgs[picidx][3]+'"' : this.target? ' target="'+this.target+'"' : '')+' onclick="'+(this.onclick? this.onclick : 'window.open(this.href, (this.target? this.target : \'_self\')'+specs+');return false;')+'">'
    }
    slideHTML+='<img id="theimg'+picidx+'_'+this.issid+'" src="'+(this.loadimgidx[picidx]&&typeof this.loadimgidx[picidx].complete=='boolean'&&this.loadimgidx[picidx].complete? this.loadimgidx[picidx].src : this.imgs[picidx][0])+'" alt="'+(this.ualt? this.imgs[picidx][1] : 'Slide Show Image')+'" title="'+(this.utit? this.imgs[picidx][1] : '')+'" '+(this.imbcolor&&!this.imgs[picidx].noborder? 'style="border:'+this.imgborder+'px '+(this.imbstyle? this.imbstyle : 'solid')+' '+this.imbcolor+';"' : 'border="'+(this.imgs[picidx].noborder? '0' : this.imgborder)+'"')+(!this.width||!this.height? ' onload="iss['+this.issid+'].imgload(this);"' : '')+'>'
    if (this.imgs[picidx][2]) //if associated link exists for img
    slideHTML+='<\/a>'
    slideHTML+='<\/td><\/tr><\/table>'
    picobj.innerHTML=slideHTML
    }
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  3. The Following User Says Thank You to vwphillips For This Useful Post:

    ruhane (06-14-2012)

  4. #3
    Join Date
    Jun 2012
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thank you, works fine

  5. #4
    Join Date
    Jun 2012
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    It worked ok at first, but now the pictures show behind each other.its as if one picture goes but the next if it is smaller sits on top of it and bits show around the edge from the next picture. How do i fix this?
    Thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •