problem with Internet Explorer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Yve

    problem with Internet Explorer

    Hallo,

    this testweb works well in Mozilla and Netscape but not in Internet
    Explorer.



    As I am not good at JavaScript I have got no idea where to look fot
    the bug.

    I kindly ask you for your help.

    I add the parts of code that might be buggy.

    Thank you very much for your patience with newbies.

    Yvonne



    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    ..
    ..
    ..
    <script language="JavaS cript">
    <!--
    function Go(x)
    {
    if(x == "nothing")
    {
    document.forms[0].reset();
    document.forms[0].elements[0].blur();
    return;
    }
    else if(x == "end") top.location.hr ef = parent.frames[1].location;
    else
    {
    parent.frames[1].location.href = x;
    document.forms[0].reset();
    document.forms[0].elements[0].blur();
    }
    }
    //-->
    </script>
    ..
    ..
    ..
    <form>
    <select name="bereich1"
    onChange="Go(th is.form.bereich 1.options[this.form.berei ch1.options.sel ectedIndex].value)"
    width="50">
    <option value="nothing" >Bereich1
    <option value="nothing" >. . . . . . . </option>
    <option value=""onClick ="parent.conten t.location='../content/content_gelb.ht ml';
    parent.thumbs.l ocation='../thumbs/thumbs_gelb.htm l'; return
    false;">gelb</option>
    <option value=""onClick ="parent.conten t.location='../content/content_blau.ht ml';
    parent.thumbs.l ocation='../thumbs/thumbs_blau.htm l'; return
    false;">blau</option>
    </select>
    </form>
    </td>
    <td width="25" valign="bottom" >&nbsp;</td>
    <td width="155">
    <form>
    <select name="bereich2"
    onChange="Go(th is.form.bereich 2.options[this.form.berei ch2.options.sel ectedIndex].value)"
    width="50">
    <option value="nothing" >Bereich2 </option>
    <option value="nothing" >. . . . . . . </option>
    <option value=""onClick ="parent.conten t.location='../content/content_rot.htm l';
    parent.thumbs.l ocation='../thumbs/thumbs_rot.html '; return
    false;">rot</option>
    <option value=""onClick ="parent.conten t.location='../content/content_gruen.h tml';
    parent.thumbs.l ocation='../thumbs/thumbs_gruen.ht ml'; return
    false;">grĂ¼n</option>
    </select>
    </form>
    ..
    ..
    ..
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
  • Janwillem Borleffs

    #2
    Re: problem with Internet Explorer


    "Yve" <y.maeder@netzw erkservice.com> schreef in bericht
    news:d3dc2639.0 311141411.7023c eeb@posting.goo gle.com...[color=blue]
    >
    > this testweb works well in Mozilla and Netscape but not in Internet
    > Explorer.
    >[/color]

    Try it as follows:

    function Go(x) {
    if (x != "nothing") {
    parent.content. location = x.split('|')[0];
    parent.thumbs.l ocation = x.split('|')[1];
    }
    document.forms[0].reset();
    document.forms[0].elements[0].blur();
    }

    <select size=1 name="bereich1" onChange="Go(va lue)" width="50">
    <option value="nothing" >Bereich1
    <option value="nothing" >. . . . . . . </option>
    <option
    value="../content/content_gelb.ht ml|../thumbs/thumbs_gelb.htm l">gelb</option[color=blue]
    >[/color]
    <option
    value="../content/content_blau.ht ml|../thumbs/thumbs_blau.htm l">blau</option[color=blue]
    >[/color]
    </select>

    BTW, the Go function only resets the first form. This can be fixed, of
    course, but I think you should use only 1 form to encapsule both select
    elements.

    When the names of pages are constant, you could also use the following:

    function Go(x) {
    if (x != "nothing") {
    parent.content. location = "../content/content_" + x + ".html";
    parent.thumbs.l ocation = "../thumbs/thumbs_" + x + ".html";
    }
    document.forms[0].reset();
    document.forms[0].elements[0].blur();
    }

    <select size=1 name="bereich1" onChange="Go(va lue)" width="50">
    <option value="nothing" >Bereich1
    <option value="nothing" >. . . . . . . </option>
    <option value="gelb">ge lb</option>
    <option value="blau">bl au</option>
    </select>

    HTH,
    JW



    Comment

    • Yve

      #3
      Re: problem with Internet Explorer

      A friend solved the problem (exchanging more than 1 frame out of drop
      dowm menu)by this:

      function GoToURL(val)
      {
      if(val == "nothing")
      {
      document.forms[0].reset();
      document.forms[0].elements[0].blur();
      return;
      } else if (val == "end") {
      top.location.hr ef = parent.frames[1].location;
      } else {
      //alert (val);
      eval(val);
      document.forms[1].reset();
      //document.forms[0].elements[0].blur();
      }
      }

      Yvonne.

      Comment

      Working...