Creating Usemaps with JavaScript for MSIE

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sp@k

    Creating Usemaps with JavaScript for MSIE


    Has anyone had an issue creating usemaps for images using Javascript?

    The problem I've been having is related to this code:



    if(this.topImag ePath){
    this.titleTopIm age = document.create Element("img");
    this.titleTopIm age.setAttribut e("src", this.topImagePa th);
    this.titleTopIm age.setAttribut e("display", "block");
    this.titleTopIm age.setAttribut e("usemap", "#close");
    this.titleTopIm age.setAttribut e("style", "border: none");
    this.titleElm.a ppendChild(this .titleTopImage) ;
    }

    this.titleMap = document.create Element("map");
    this.titleMap.s etAttribute("id ", "close");
    this.titleMap.s etAttribute("na me", "close");
    this.titleElm.a ppendChild(this .titleMap);

    this.titleArea = document.create Element("area") ;
    this.titleArea. setAttribute("s hape", "rect");
    this.titleArea. setAttribute("c oords", "137,3,148,13") ;
    this.titleArea. setAttribute("h ref", "javascript :
    GLT.clickOutElm (true)");
    this.titleMap.a ppendChild(this .titleArea);





    What it doesn't do for me is that it doesn't create the usermap for
    this area in the MSIE. Whereas the same area seems linked and ready to
    go in Firefox. Do you code the usermap differently for MSIE? Or is
    there something I'm not seeing here?

    Thanks in advance.

  • ASM

    #2
    Re: Creating Usemaps with JavaScript for MSIE

    sp@k a écrit :
    The problem I've been having is related to this code:
    >
    if(this.topImag ePath){
    this.titleTopIm age = document.create Element("img");
    this.titleTopIm age.setAttribut e("src", this.topImagePa th);
    this.titleTopIm age.setAttribut e("display", "block");
    this.titleTopIm age.setAttribut e("style", "display:block" );
    this.titleTopIm age.setAttribut e("usemap", "#close");
    this.titleTopIm age.setAttribut e("style", "border: none");
    (snip)
    What it doesn't do for me is that it doesn't create the usermap for
    this area in the MSIE. Whereas the same area seems linked and ready to
    go in Firefox. Do you code the usermap differently for MSIE? Or is
    there something I'm not seeing here?
    could try direct talk ? (in right order is better)

    if(this.topImag ePath){
    this.titleTopIm age = document.create Element("img");
    this.titleTopIm age.src = this.topImagePa th;
    this.titleTopIm age.style.displ ay = "block";
    this.titleTopIm age.style.borde r = "none";
    this.titleTopIm age.usemap = "#close";
    this.titleElm.a ppendChild(this .titleTopImage) ;
    }

    this.titleMap = document.create Element("map");
    this.titleMap.i d = "close";
    this.titleMap.n ame = "close";

    this.titleArea = document.create Element("area") ;
    this.titleArea. shape = "rect";
    this.titleArea. coords = "137,3,148, 13";
    this.titleArea. href = "javascript:GLT .clickOutElm(tr ue)";
    this.titleMap.a ppendChild(this .titleArea);

    this.titleElm.a ppendChild(this .titleMap);

    Comment

    Working...