client side image maps

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

    client side image maps

    Dear All,

    I have an image map that works perfectly in firefox, but not IE can anyone
    help?

    The code I use is below.

    Thanks for any help

    Colin


    <snip>
    <SCRIPT LANGUAGE="JavaS cript">
    function species(xpath) {
    document.form1. xpath.value = xpath;
    document.form1. action="/demo/editor/modSpecie.spy";
    document.form1. submit();
    }
    </SCRIPT>

    <form name="form1" method="post" action='#'>

    <IMG SRC="/demo/graphs/09794069.gif" USEMAP=#mainmap >
    <MAP NAME="mainmap">
    <area shape="rect" href="Javascrip t:species(&apos ;//sbml:species[1]&apos;)"
    title="Y1" alt="Y1" coords="244,53, 316,101">

    </map>
    </form>
    </snip>


  • Steve Pugh

    #2
    Re: client side image maps

    "C Gillespie" <csgcsg39@hotma il.com> wrote:
    [color=blue]
    >I have an image map that works perfectly in firefox, but not IE can anyone
    >help?[/color]

    Does it work prefectly when JavaScript is disabled?
    [color=blue]
    ><SCRIPT LANGUAGE="JavaS cript">[/color]

    Language is deprecated, use type="text/javascript" instead.
    [color=blue]
    > function species(xpath) {
    > document.form1. xpath.value = xpath;[/color]

    There's no child of form1 called xpath in your HTML.
    Is this snippet incomplete?

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

    Comment

    • Harlan Messinger

      #3
      Re: client side image maps


      "C Gillespie" <csgcsg39@hotma il.com> wrote in message
      news:cf8aqs$ti2 $1@ucsnew1.ncl. ac.uk...[color=blue]
      > Dear All,
      >
      > I have an image map that works perfectly in firefox, but not IE can anyone
      > help?[/color]

      Would you call a mechanic and say "My car isn't working. What should I do?"
      without giving him anything more specific to go on than "isn't working"?


      Comment

      • C Gillespie

        #4
        Re: client side image maps

        > Would you call a mechanic and say "My car isn't working. What should I[color=blue]
        > do?" without giving him anything more specific to go on than "isn't
        > working"?[/color]

        I apologise, in my haste to simply things, I went overboard. Try again.
        Here is my code. Any help welcome.

        Oh, and it works it with Opera and when I disable Javascript IE still
        doesn't work.

        Thanks

        Colin

        <SCRIPT type="text/javascript">
        function species(xpath){
        document.form1. xpath.value = xpath;
        document.form1. action="/demo/editor/modSpecie.spy";
        document.form1. submit();
        }
        function reaction(xpath) {
        document.form1. xpath.value = xpath;
        document.form1. action="/demo/editor/modReaction.spy ";
        document.form1. submit();
        }
        </SCRIPT>

        <form name="form1" method="post" action='#'>
        <input type="hidden" name="xpath" value="None">
        </form>

        <IMG SRC="/demo/graphs/86306461.gif" USEMAP=#mainmap >
        <MAP NAME="mainmap">
        <area shape="rect"
        href="Javascrip t:species(&apos ;//sbml:species[1]&apos;)" title="Y2" alt="Y2"
        coords="253,90, 325,138">
        <area shape="rect"
        href="Javascrip t:reaction(&apo s;//sbml:reaction[1]&apos;)" title="Y1"
        alt="Y1" coords="72,90,1 44,138">
        </map>


        Comment

        • Steve Pugh

          #5
          Re: client side image maps

          "C Gillespie" <csgcsg39@hotma il.com> wrote:
          [color=blue]
          >Oh, and it works it with Opera and when I disable Javascript IE still
          >doesn't work.[/color]

          Are you saying that it works when you disable JavaScript in Opera (I
          don't believe you), or that it doesn't work in when you disable
          JavaScript in IE (I believe you).

          What you have done will not work, ever, in any browser, if JavaScript
          is disabled. Hence it is not suitable for deployment on the WWW.
          [color=blue]
          > <area shape="rect"
          >href="Javascri pt:species(&apo s;//sbml:species[1]&apos;)" title="Y2" alt="Y2"
          >coords="253,90 ,325,138">[/color]

          Why the &apos;? What is the value that you want to pass to the server?
          Is it
          &apos;//sbml:species[1]&apos;
          or
          '//sbml:species[1]'
          or
          //sbml:species[1]

          In each of the above cases your code should read:
          species('&apos;//sbml:species[1]&apos;')
          species('\'//sbml:species[1]\'')
          species('//sbml:species[1]')

          I'd recommend that further JavaScript questions are asked in
          comp.lang.javas cript.

          Steve

          --
          "My theories appal you, my heresies outrage you,
          I never answer letters and you don't like my tie." - The Doctor

          Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

          Comment

          • Harlan Messinger

            #6
            Re: client side image maps

            "C Gillespie" <csgcsg39@hotma il.com> wrote:
            [color=blue][color=green]
            >> Would you call a mechanic and say "My car isn't working. What should I
            >> do?" without giving him anything more specific to go on than "isn't
            >> working"?[/color]
            >
            >I apologise, in my haste to simply things, I went overboard. Try again.
            >Here is my code. Any help welcome.
            >
            >Oh, and it works it with Opera and when I disable Javascript IE still
            >doesn't work.[/color]

            You still haven't said what "doesn't work" means. It ignores your
            click? You get an error within the code? It does something else you
            didn't expect? Have you tried troubleshooting at all?
            [color=blue]
            >
            >Thanks
            >
            >Colin
            >
            ><SCRIPT type="text/javascript">
            > function species(xpath){
            > document.form1. xpath.value = xpath;
            > document.form1. action="/demo/editor/modSpecie.spy";
            > document.form1. submit();
            > }
            > function reaction(xpath) {
            > document.form1. xpath.value = xpath;
            > document.form1. action="/demo/editor/modReaction.spy ";
            > document.form1. submit();
            > }
            ></SCRIPT>
            >
            ><form name="form1" method="post" action='#'>
            > <input type="hidden" name="xpath" value="None">
            ></form>
            >
            ><IMG SRC="/demo/graphs/86306461.gif" USEMAP=#mainmap >
            ><MAP NAME="mainmap">
            > <area shape="rect"
            >href="Javascri pt:species(&apo s;//sbml:species[1]&apos;)" title="Y2" alt="Y2"
            >coords="253,90 ,325,138">
            > <area shape="rect"
            >href="Javascri pt:reaction(&ap os;//sbml:reaction[1]&apos;)" title="Y1"
            >alt="Y1" coords="72,90,1 44,138">
            ></map>
            >[/color]


            --
            Harlan Messinger
            Remove the first dot from my e-mail address.
            Veuillez ôter le premier point de mon adresse de courriel.

            Comment

            Working...